更新协议页面,新增竞买协议和拍卖移交确认书的URL处理逻辑,优化PDF获取流程,调整协议列表的显示方式
This commit is contained in:
parent
3b015f3e9c
commit
e44fbb46d8
@ -13,8 +13,9 @@ const { t } = useI18n()
|
|||||||
const { formData, number, qrData } = codeAuthStore()
|
const { formData, number, qrData } = codeAuthStore()
|
||||||
const activeNames = ref('')
|
const activeNames = ref('')
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const pmblUrl = ref('')
|
const pmblUrl = ref('') // 存储拍卖笔录的URL
|
||||||
|
const jmxyUrl=ref('')//竞买协议
|
||||||
|
const pmyjqrsUrl=ref('')//拍卖移交确认书
|
||||||
/**
|
/**
|
||||||
* 根据签署顺序(number)返回不同的协议列表
|
* 根据签署顺序(number)返回不同的协议列表
|
||||||
* number = 1: 买家签署阶段,展示竞买协议、竞买须知、拍卖公告、拍卖规则
|
* number = 1: 买家签署阶段,展示竞买协议、竞买须知、拍卖公告、拍卖规则
|
||||||
@ -23,32 +24,39 @@ const pmblUrl = ref('')
|
|||||||
const protocolList = computed(() => {
|
const protocolList = computed(() => {
|
||||||
if (number.value === 1) {
|
if (number.value === 1) {
|
||||||
return [
|
return [
|
||||||
{ id: '4', title: t('signature.agreement.buyerAgreement'), pdfName: 'jmxy', type: 'local' },
|
{ id: '4', title: t('signature.agreement.buyerAgreement'), pdfName: jmxyUrl.value, type: 'remote' },
|
||||||
{ id: '3', title: t('signature.agreement.buyerGuide'), pdfName: 'jmxz', 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: '1', title: t('signature.agreement.notice'), pdfName: 'pmgg', type: 'local' },
|
||||||
{ id: '2', title: t('signature.agreement.rules'), pdfName: 'pmgz', type: 'local' },
|
{ id: '2', title: t('signature.agreement.rules'), pdfName: 'pmgz', type: 'local' },
|
||||||
]
|
]
|
||||||
} else if (number.value === 2) {
|
} else if (number.value === 2) {
|
||||||
return [
|
return [
|
||||||
{ id: '6', title: t('signature.agreement.transfer'), pdfName: 'pmyjqrs', type: 'local' },
|
{ id: '6', title: t('signature.agreement.transfer'), pdfName: pmyjqrsUrl.value, type: 'remote' },
|
||||||
{ id: '5', title: t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' }
|
{ id: '5', title: t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
|
console.log('number',number.value)
|
||||||
/**
|
/**
|
||||||
* 获取拍卖笔录PDF
|
* 获取拍卖笔录PDF
|
||||||
* 通过拍品UUID获取拍卖笔录的查看地址
|
* 通过拍品UUID获取拍卖笔录的查看地址
|
||||||
*/
|
*/
|
||||||
const fetchPmblPdf = async () => {
|
const fetchPmblPdf = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await contractView({
|
const res = await contractView({
|
||||||
auctionArtworkUuid: qrData.value.auctionArtworkUuid,
|
auctionArtworkUuid: qrData.value.auctionArtworkUuid,
|
||||||
|
phone:formData.value.phone,
|
||||||
|
registerType:2,
|
||||||
|
signOrder:number.value
|
||||||
})
|
})
|
||||||
pmblUrl.value = res.data?.viewUrl
|
if(res.status===0){
|
||||||
|
jmxyUrl.value=res.data.ViewUrls?.jmxy1
|
||||||
|
pmblUrl.value=res.data.ViewUrls?.ppbl6
|
||||||
|
pmyjqrsUrl.value=res.data.ViewUrls?.ppqr5
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取拍卖笔录失败:', error)
|
console.log('error',error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,9 +64,13 @@ const fetchPmblPdf = async () => {
|
|||||||
* 折叠面板变化处理
|
* 折叠面板变化处理
|
||||||
* 当打开拍卖笔录面板时,获取PDF地址
|
* 当打开拍卖笔录面板时,获取PDF地址
|
||||||
*/
|
*/
|
||||||
|
// 监听折叠面板变化
|
||||||
const handleCollapseChange = (name) => {
|
const handleCollapseChange = (name) => {
|
||||||
activeNames.value = name
|
activeNames.value = name
|
||||||
if (name === '5' && !pmblUrl.value) {
|
console.log('handleCollapseChange')
|
||||||
|
console.log('name',name)
|
||||||
|
console.log('protocolList.value.find(x=>x.id===name)?.pdfName',protocolList.value.find(x=>x.id===name)?.pdfName)
|
||||||
|
if (['4','5','6'].includes(name) && !protocolList.value.find(x=>x.id===name)?.pdfName) {
|
||||||
fetchPmblPdf()
|
fetchPmblPdf()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,6 +102,10 @@ const goLogin=()=>{
|
|||||||
<div class="border-b-[1.7px] mt-[8px]">
|
<div class="border-b-[1.7px] mt-[8px]">
|
||||||
<van-field v-model="form1.realName" :label="$t('realAuth.name')" clearable :placeholder="$t('realAuth.namePlaceholder')"></van-field>
|
<van-field v-model="form1.realName" :label="$t('realAuth.name')" clearable :placeholder="$t('realAuth.namePlaceholder')"></van-field>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="border-b-[1.7px] mt-[8px]">
|
||||||
|
<van-field v-model="form1.userExtend.address" :label="$t('realAuth.adress')" clearable
|
||||||
|
:placeholder="$t('realAuth.adressPlaceholder')"></van-field>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</van-tab>
|
</van-tab>
|
||||||
|
@ -7,6 +7,7 @@ import { authStore } from "~/stores/auth/index.js"
|
|||||||
import {useI18n} from "vue-i18n";
|
import {useI18n} from "vue-i18n";
|
||||||
import { useThrottleFn } from '@vueuse/core'
|
import { useThrottleFn } from '@vueuse/core'
|
||||||
import { contractUserinfo } from "@/api/auth/index.js"
|
import { contractUserinfo } from "@/api/auth/index.js"
|
||||||
|
import { ref } from 'vue';
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: 'default',
|
layout: 'default',
|
||||||
i18n: 'signature.protocol.title'
|
i18n: 'signature.protocol.title'
|
||||||
@ -17,15 +18,16 @@ const $t=useI18n().t
|
|||||||
const activeNames = ref([])
|
const activeNames = ref([])
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const pmblUrl = ref('') // 存储拍卖笔录的URL
|
const pmblUrl = ref('') // 存储拍卖笔录的URL
|
||||||
|
const jmxyUrl=ref('')//竞买协议
|
||||||
|
const pmyjqrsUrl=ref('')//拍卖移交确认书
|
||||||
// 协议列表数据
|
// 协议列表数据
|
||||||
const protocolList = computed(() => [
|
const protocolList = computed(() => [
|
||||||
{ id: '1', title: $t('signature.agreement.notice'), pdfName: 'pmgg', type: 'local' },
|
{ id: '1', title: $t('signature.agreement.notice'), pdfName: 'pmgg', type: 'local' },
|
||||||
{ id: '2', title: $t('signature.agreement.rules'), pdfName: 'pmgz', type: 'local' },
|
{ id: '2', title: $t('signature.agreement.rules'), pdfName: 'pmgz', type: 'local' },
|
||||||
{ id: '3', title: $t('signature.agreement.buyerGuide'), pdfName: 'jmxz', type: 'local' },
|
{ id: '3', title: $t('signature.agreement.buyerGuide'), pdfName: 'jmxz', type: 'local' },
|
||||||
{ id: '4', title: $t('signature.agreement.buyerAgreement'), pdfName: 'jmxy', type: 'local' },
|
{ id: '4', title: $t('signature.agreement.buyerAgreement'), pdfName: jmxyUrl.value, type: 'remote' },
|
||||||
{ id: '5', title: $t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' },
|
{ id: '5', title: $t('signature.agreement.record'), pdfName: pmblUrl.value, type: 'remote' },
|
||||||
{ id: '6', title: $t('signature.agreement.transfer'), pdfName: 'pmyjqrs', type: 'local' }
|
{ id: '6', title: $t('signature.agreement.transfer'), pdfName: pmyjqrsUrl.value, type: 'remote' }
|
||||||
])
|
])
|
||||||
const toast=ref(false)
|
const toast=ref(false)
|
||||||
// 获取拍卖笔录PDF
|
// 获取拍卖笔录PDF
|
||||||
@ -33,8 +35,15 @@ const fetchPmblPdf = async () => {
|
|||||||
try {
|
try {
|
||||||
const res = await contractView({
|
const res = await contractView({
|
||||||
auctionArtworkUuid: payment.value.auctionArtworkUuid,
|
auctionArtworkUuid: payment.value.auctionArtworkUuid,
|
||||||
|
phone:userInfo.value.telNum,
|
||||||
|
registerType:1,
|
||||||
|
signOrder:1
|
||||||
})
|
})
|
||||||
pmblUrl.value = res.data?.viewUrl // 假设接口返回的PDF URL在data字段中
|
if(res.status===0){
|
||||||
|
jmxyUrl.value=res.data.ViewUrls?.jmxy1
|
||||||
|
pmblUrl.value=res.data.ViewUrls?.ppbl6
|
||||||
|
pmyjqrsUrl.value=res.data.ViewUrls?.ppqr5
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,8 +51,7 @@ const fetchPmblPdf = async () => {
|
|||||||
// 监听折叠面板变化
|
// 监听折叠面板变化
|
||||||
const handleCollapseChange = (name) => {
|
const handleCollapseChange = (name) => {
|
||||||
activeNames.value = name
|
activeNames.value = name
|
||||||
// 当打开拍卖笔录时获取PDF
|
if (['4','5','6'].includes(name) && !protocolList.value.find(x=>x.id===name)?.pdfName) {
|
||||||
if (name === '5' && !pmblUrl.value) {
|
|
||||||
fetchPmblPdf()
|
fetchPmblPdf()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ export const codeAuthStore = createGlobalState(() => {
|
|||||||
const lotNo=useLocalStorage('lotNo',undefined)
|
const lotNo=useLocalStorage('lotNo',undefined)
|
||||||
const price=useLocalStorage('price',undefined)
|
const price=useLocalStorage('price',undefined)
|
||||||
const auctionArtworkUuid=useLocalStorage('auctionArtworkUuid',undefined)
|
const auctionArtworkUuid=useLocalStorage('auctionArtworkUuid',undefined)
|
||||||
const number=useLocalStorage('number',undefined)
|
const number=useLocalStorage('number',0)
|
||||||
const qrUid=useLocalStorage('qrUid',undefined)
|
const qrUid=useLocalStorage('qrUid',undefined)
|
||||||
const cpayment=useLocalStorage('cpayment',{
|
const cpayment=useLocalStorage('cpayment',{
|
||||||
price:'',
|
price:'',
|
||||||
|
Loading…
Reference in New Issue
Block a user