2023-12-23 18:59:25 +08:00
|
|
|
<template>
|
|
|
|
<div class="detail-popup">
|
2023-12-25 18:30:29 +08:00
|
|
|
<popup ref="popupRef" title="汇票转出详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
2023-12-23 18:59:25 +08:00
|
|
|
<el-form ref="formRef" :model="formData" label-width="160px">
|
|
|
|
<el-card class="mb-2">
|
|
|
|
<el-row>
|
2023-12-25 18:30:29 +08:00
|
|
|
|
2023-12-23 18:59:25 +08:00
|
|
|
<el-col :span="12">
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-form-item label="组织名称">
|
|
|
|
{{ formData.org.name }}
|
2023-12-23 18:59:25 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="12">
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-form-item label="部门名称">
|
|
|
|
{{ formData.org.name
|
2023-12-23 18:59:25 +08:00
|
|
|
}}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-col :span="12">
|
2023-12-23 18:59:25 +08:00
|
|
|
<el-form-item label="供应商名称">
|
2023-12-25 18:30:29 +08:00
|
|
|
{{ formData.supplier_name
|
|
|
|
|
2023-12-23 18:59:25 +08:00
|
|
|
}}
|
|
|
|
</el-form-item>
|
2023-12-25 18:30:29 +08:00
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="合同编号">
|
2024-01-02 10:01:19 +08:00
|
|
|
{{ formData.contract ? formData.contract.contract_no : '暂无数据' }}
|
2023-12-25 18:30:29 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
2023-12-23 18:59:25 +08:00
|
|
|
<el-col :span="12">
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-form-item label="项目名称">
|
2024-01-02 10:01:19 +08:00
|
|
|
{{ formData.project ? formData.project.name : '暂无数据'
|
2023-12-23 18:59:25 +08:00
|
|
|
}}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-form-item label="项目编号">
|
2024-01-02 10:01:19 +08:00
|
|
|
{{ formData.project ? formData.project.project_code : '暂无数据' }}
|
2023-12-23 18:59:25 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2023-12-25 18:30:29 +08:00
|
|
|
|
|
|
|
|
2023-12-23 18:59:25 +08:00
|
|
|
<el-col :span="12">
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-form-item label="合同名称">
|
2024-01-02 10:01:19 +08:00
|
|
|
{{ formData.contract ? formData.contract.contract_name : '暂无数据'
|
2023-12-25 18:30:29 +08:00
|
|
|
}}
|
2023-12-23 18:59:25 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-form-item label="合同类型">
|
2024-03-07 15:43:35 +08:00
|
|
|
<dict-value :options="dictData.contract_type"
|
|
|
|
:value="formData.contract.contract_type" />
|
2023-12-23 18:59:25 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-form-item label="票据编号">
|
|
|
|
{{ formData.acceptance.bill_sn
|
|
|
|
}}
|
2023-12-23 18:59:25 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-form-item label="汇票类型">
|
|
|
|
<dict-value :options="dictData.bill_type" :value="formData.acceptance.bill_type" />
|
2023-12-23 18:59:25 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="汇票承兑银行">
|
|
|
|
{{ formData.acceptance.draft_acceptance_bank }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
2023-12-23 18:59:25 +08:00
|
|
|
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="收票账户编码">
|
|
|
|
{{ formData.bankAccount.account }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="收票账户">
|
|
|
|
{{ formData.bankAccount.account_name }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2023-12-23 18:59:25 +08:00
|
|
|
|
2023-12-25 18:30:29 +08:00
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="汇票到期日期">
|
|
|
|
{{ formData.acceptance.bill_due_date }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="付款日期">
|
|
|
|
{{ formData.payment_date }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col> <el-col :span="12">
|
|
|
|
<el-form-item label="金额">
|
|
|
|
{{ formData.amount }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="金额大写">
|
|
|
|
{{ formData.amount_daxie }}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="备注">
|
|
|
|
{{ formData.remark
|
|
|
|
}}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
2023-12-23 18:59:25 +08:00
|
|
|
<el-col :span="12">
|
|
|
|
<el-form-item label="备注">
|
|
|
|
{{ formData.remark
|
|
|
|
}}
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-form-item label="附件">
|
2023-12-25 18:30:29 +08:00
|
|
|
<div v-if="formDataannex.length > 0">
|
2024-03-07 15:43:35 +08:00
|
|
|
<div v-for="(item, index) in formDataannex"
|
|
|
|
style="margin-left: 5px;display: block;">
|
|
|
|
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
|
|
|
|
:href="item.uri" target="_blank">{{ item.name }}</a>
|
|
|
|
<span style="cursor: pointer;margin-left: 5px;"
|
|
|
|
@click="delFileFn(index)">x</span>
|
2023-12-23 18:59:25 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-12-25 18:30:29 +08:00
|
|
|
<div v-else>暂无文件</div>
|
2023-12-23 18:59:25 +08:00
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
</el-card>
|
|
|
|
</el-form>
|
|
|
|
</popup>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup name="customdetail">
|
|
|
|
|
|
|
|
import type { FormInstance } from 'element-plus'
|
|
|
|
import Popup from '@/components/popup/index.vue'
|
|
|
|
import { apiCustomDetail } from '@/api/custom'
|
|
|
|
import { timeFormat } from '@/utils/util'
|
|
|
|
import type { PropType } from 'vue'
|
|
|
|
defineProps({
|
|
|
|
dictData: {
|
|
|
|
type: Object as PropType<Record<string, any[]>>,
|
|
|
|
default: () => ({})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
const formDataannex = reactive([])
|
|
|
|
const emit = defineEmits(['success', 'close'])
|
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
|
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
|
|
|
|
|
|
// 表单数据
|
|
|
|
const formData = reactive({
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取详情
|
|
|
|
const setFormData = async (data: Record<any, any>) => {
|
2023-12-25 18:30:29 +08:00
|
|
|
Object.assign(formData, data)
|
|
|
|
if (data.annex && data.annex.length > 0) {
|
|
|
|
|
|
|
|
const arry1 = data.annex.map((item: any, index: any) => {
|
|
|
|
return {
|
|
|
|
name: `文件${index + 1}`,
|
|
|
|
uri: item
|
|
|
|
};
|
|
|
|
});
|
|
|
|
Object.assign(formDataannex, arry1)
|
|
|
|
|
|
|
|
|
2023-12-23 18:59:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-25 18:30:29 +08:00
|
|
|
|
2023-12-23 18:59:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const getDetail = async (row: Record<string, any>) => {
|
|
|
|
const data = await apiCustomDetail({
|
|
|
|
id: row.id
|
|
|
|
})
|
|
|
|
setFormData(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 提交按钮
|
|
|
|
const handleSubmit = async () => {
|
|
|
|
popupRef.value?.close()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//打开弹窗
|
|
|
|
const open = () => {
|
|
|
|
popupRef.value?.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
// 关闭回调
|
|
|
|
const handleClose = () => {
|
|
|
|
emit('close')
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
open,
|
|
|
|
setFormData,
|
|
|
|
getDetail
|
|
|
|
})
|
|
|
|
</script>
|
2024-03-07 15:43:35 +08:00
|
|
|
|
2024-01-08 18:13:35 +08:00
|
|
|
<style lang="scss" scoped>
|
2023-12-23 18:59:25 +08:00
|
|
|
.tit {
|
|
|
|
font-size: 1.2em;
|
|
|
|
margin-bottom: 10px;
|
|
|
|
}
|
2024-01-08 18:13:35 +08:00
|
|
|
|
|
|
|
:deep(.my-label) {
|
|
|
|
width: 150px;
|
|
|
|
}
|
2023-12-23 18:59:25 +08:00
|
|
|
</style>
|