2025-02-06 02:20:11 +00:00
|
|
|
<script setup>
|
2025-02-21 03:19:15 +00:00
|
|
|
import pdfView from './pdfView'
|
|
|
|
import { contractView } from "~/api/goods/index.js"
|
2025-02-19 07:14:01 +00:00
|
|
|
import {codeAuthStore} from "~/stores-collect-code/auth/index.js";
|
|
|
|
import {signOffline} from "~/api/goods/index.js";
|
2025-02-19 10:19:57 +00:00
|
|
|
definePageMeta({
|
2025-02-21 03:19:15 +00:00
|
|
|
title:'签署'
|
|
|
|
})
|
|
|
|
|
|
|
|
const {formData,number,qrData}=codeAuthStore()
|
|
|
|
const activeNames = ref([])
|
|
|
|
const router = useRouter()
|
|
|
|
const pmblUrl = ref('') // 存储拍卖笔录的URL
|
|
|
|
|
|
|
|
// 协议列表数据
|
|
|
|
const protocolList = computed(() => {
|
2025-02-25 10:21:05 +00:00
|
|
|
if(number.value==1){
|
2025-02-25 09:00:07 +00:00
|
|
|
return [
|
|
|
|
{ id: '4', title: $t('signature.agreement.buyerAgreement'), pdfName: 'jmxy', type: 'local' },
|
|
|
|
{ id: '3', title: $t('signature.agreement.buyerGuide'), pdfName: 'jmxz', type: 'local' },
|
|
|
|
{ id: '1', title: $t('signature.agreement.notice'), pdfName: 'pmgg', type: 'local' },
|
|
|
|
{ id: '2', title: $t('signature.agreement.rules'), pdfName: 'pmgz', type: 'local' },
|
2025-02-21 03:19:15 +00:00
|
|
|
]
|
2025-02-25 10:21:05 +00:00
|
|
|
}else if(number.value==2) {
|
2025-02-21 03:19:15 +00:00
|
|
|
return [
|
2025-02-25 09:00:07 +00:00
|
|
|
{ id: '6', title: $t('signature.agreement.transfer'), pdfName: 'pmyjqrs', type: 'local' },
|
|
|
|
{ id: '5', title: $t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' }
|
2025-02-21 03:19:15 +00:00
|
|
|
]
|
|
|
|
}
|
2025-02-19 10:19:57 +00:00
|
|
|
})
|
2025-02-21 03:19:15 +00:00
|
|
|
|
|
|
|
// 获取拍卖笔录PDF
|
|
|
|
const fetchPmblPdf = async () => {
|
|
|
|
try {
|
|
|
|
const res = await contractView({
|
|
|
|
auctionArtworkUuid: qrData.value.auctionArtworkUuid,
|
|
|
|
})
|
|
|
|
pmblUrl.value = res.data?.viewUrl // 假设接口返回的PDF URL在data字段中
|
|
|
|
} catch (error) {
|
|
|
|
console.error('获取拍卖笔录失败:', error)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 监听折叠面板变化
|
|
|
|
const handleCollapseChange = (name) => {
|
|
|
|
activeNames.value = name
|
|
|
|
// 当打开拍卖笔录时获取PDF
|
|
|
|
if (name === '5' && !pmblUrl.value) {
|
|
|
|
fetchPmblPdf()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-02-20 03:35:23 +00:00
|
|
|
|
2025-02-19 07:14:01 +00:00
|
|
|
const confirm=async ()=>{
|
|
|
|
if (formData.value.countryCode==='86'&&formData.value.cardType===1){
|
2025-02-19 10:19:57 +00:00
|
|
|
const res=await signOffline({
|
|
|
|
userInfo:formData.value,
|
2025-02-20 03:35:23 +00:00
|
|
|
auctionArtworkUuid:qrData.value.auctionArtworkUuid,
|
2025-02-19 10:19:57 +00:00
|
|
|
signOrder:Number(number.value),
|
|
|
|
})
|
|
|
|
if (res.status===0){
|
|
|
|
window.location.href=res.data.fddVerifyUrl
|
|
|
|
}
|
|
|
|
}else {
|
|
|
|
router.push('/collectCode/signature/panel')
|
2025-02-19 07:14:01 +00:00
|
|
|
}
|
|
|
|
}
|
2025-02-21 03:19:15 +00:00
|
|
|
const goSignature = () => {
|
|
|
|
router.push({
|
|
|
|
path: '/signature/panel'
|
|
|
|
})
|
|
|
|
}
|
2025-02-06 02:20:11 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2025-02-21 03:19:15 +00:00
|
|
|
<div class="bg-#EBEBEB h-screen-nav flex flex-col">
|
|
|
|
<div class="h-50px text-14px text-#191919 bg-#fff flex items-center px-21px mb-6px shrink-0">
|
2025-02-25 09:00:07 +00:00
|
|
|
{{ $t('signature.tips.prePayment') }}
|
2025-02-21 03:19:15 +00:00
|
|
|
</div>
|
2025-02-25 09:00:07 +00:00
|
|
|
|
2025-02-21 03:19:15 +00:00
|
|
|
<van-collapse
|
|
|
|
accordion
|
|
|
|
v-model="activeNames"
|
|
|
|
class="grow-1"
|
|
|
|
@change="handleCollapseChange"
|
|
|
|
>
|
|
|
|
<van-collapse-item
|
|
|
|
v-for="item in protocolList"
|
|
|
|
:key="item.id"
|
|
|
|
:name="item.id"
|
|
|
|
class="mb-6px"
|
|
|
|
>
|
|
|
|
<template #title>
|
|
|
|
<div class="text-#2B53AC text-14px">{{ item.title }}</div>
|
|
|
|
</template>
|
|
|
|
<pdfView
|
|
|
|
:pdf-name="item.pdfName"
|
|
|
|
:type="item.type"
|
|
|
|
:is-active="activeNames === item.id"
|
|
|
|
/>
|
|
|
|
</van-collapse-item>
|
|
|
|
</van-collapse>
|
2025-02-25 09:00:07 +00:00
|
|
|
|
2025-02-21 03:19:15 +00:00
|
|
|
<div class="h-81px bg-#fff flex justify-center pt-7px border-t">
|
|
|
|
<van-button
|
|
|
|
color="#2B53AC"
|
|
|
|
class="w-213px van-btn-h-38px"
|
|
|
|
@click="confirm"
|
|
|
|
>
|
2025-02-25 09:00:07 +00:00
|
|
|
{{ $t('signature.action.agree') }}
|
2025-02-21 03:19:15 +00:00
|
|
|
</van-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|