预览合同接口调试完成

This commit is contained in:
BianLzhaoMin 2025-12-16 18:05:34 +08:00
parent fcd6ce6ede
commit 5b199b5e78
2 changed files with 22 additions and 12 deletions

View File

@ -474,6 +474,7 @@ const form = ref({
otherTerms3: '',
captcha: '',
signaturePath: '',
signatureUrl: '',
})
//
@ -732,13 +733,15 @@ const handlePreviewContract = async () => {
// }
//
const message = form.value.captcha
const message = generateCaptcha()
const shortMessage = `【博诺思】您正在进行合同签订,验证码为:${message}有效期为5分钟。`
const nowDate = dayjs().format('YYYY-MM-DD')
const nowDateTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
console.log('videoInfo', videoInfo.value)
const params = {
videoUrl: videoInfo.value?.videoUrl || '',
videoUrl: videoInfo.value?.videoPath || '',
partA: form.value.partyA,
legalPerson: form.value.legalPerson,
partAPhone: form.value.partAPhone,
@ -758,22 +761,24 @@ const handlePreviewContract = async () => {
effectDate: form.value.effectDate,
otherSupply: form.value.otherSupply,
otherMatters: form.value.otherMatters,
partBSign: form.value.signaturePath,
partBSign: form.value.signatureUrl,
message,
signingDate: nowDate,
faceUrl: videoInfo.value?.faceUrl || '',
messageTime: nowDateTime,
shortMessage,
proId: videoInfo.value?.proId,
contractTemplateType: 1, //
proId: form.value?.proId,
contractTemplateType: videoInfo.value?.templateValue, //
agreedMethod: videoInfo.value?.agreedMethod || '',
secondContent: videoInfo.value?.secondContent || '',
isXbg: form.value.isXbg,
}
console.log('已组装的参数', params)
// const result = await previewContractAPI(params)
try {
const result = await previewContractAPI(params)
} catch (error) {
uni.$u.toast(error?.data?.obj || '预览失败')
}
// handlePreview(attachments.value[0])
}
@ -822,6 +827,7 @@ const handleGetWorkerInfo = async () => {
subName,
isXbg,
proName,
proId,
} = res
form.value.partyA = subName
@ -835,6 +841,7 @@ const handleGetWorkerInfo = async () => {
form.value.isXbg = isXbg
form.value.workAdress = proName
form.value.workTask = postName
form.value.proId = proId
getFileAddressParams.value.partA = subName
getFileAddressParams.value.partB = name
@ -888,6 +895,7 @@ const handleConfirmSignature = async () => {
if (uploadRes.res === 1 && uploadRes.obj) {
form.value.signaturePath = tempPath
form.value.signatureUrl = uploadRes.ob
showSignatureModal.value = false
} else {
uni.$u.toast(uploadRes.resMsg || '上传失败')

View File

@ -98,9 +98,9 @@ const templatePickerRef = ref(null)
//
const templateOptions = ref([
{ text: '附件1-1-用工协议(普通人员)', value: 'template1' },
{ text: '附件1-2-用工协议(技术人员)', value: 'template2' },
{ text: '附件1-3-用工协议(管理人员)', value: 'template3' },
{ text: '附件1-1-用工协议(普通人员)', value: '1' },
{ text: '附件1-2-用工协议(技术人员)', value: '2' },
{ text: '附件1-3-用工协议(管理人员)', value: '3' },
])
const templateColumns = computed(() => {
@ -227,7 +227,9 @@ const handleNext = async () => {
} else {
uni.$u.toast(uploadRes.resMsg || '上传失败')
}
} catch (err) {}
} catch (err) {
console.log(err, '123')
}
}
/**