预览合同接口调试完成
This commit is contained in:
parent
fcd6ce6ede
commit
5b199b5e78
|
|
@ -474,6 +474,7 @@ const form = ref({
|
||||||
otherTerms3: '',
|
otherTerms3: '',
|
||||||
captcha: '',
|
captcha: '',
|
||||||
signaturePath: '',
|
signaturePath: '',
|
||||||
|
signatureUrl: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
// 日期选择
|
// 日期选择
|
||||||
|
|
@ -732,13 +733,15 @@ const handlePreviewContract = async () => {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 组装参数
|
// 组装参数
|
||||||
const message = form.value.captcha
|
const message = generateCaptcha()
|
||||||
const shortMessage = `【博诺思】您正在进行合同签订,验证码为:${message},有效期为5分钟。`
|
const shortMessage = `【博诺思】您正在进行合同签订,验证码为:${message},有效期为5分钟。`
|
||||||
const nowDate = dayjs().format('YYYY-MM-DD')
|
const nowDate = dayjs().format('YYYY-MM-DD')
|
||||||
const nowDateTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
const nowDateTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
|
||||||
|
console.log('videoInfo', videoInfo.value)
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
videoUrl: videoInfo.value?.videoUrl || '',
|
videoUrl: videoInfo.value?.videoPath || '',
|
||||||
partA: form.value.partyA,
|
partA: form.value.partyA,
|
||||||
legalPerson: form.value.legalPerson,
|
legalPerson: form.value.legalPerson,
|
||||||
partAPhone: form.value.partAPhone,
|
partAPhone: form.value.partAPhone,
|
||||||
|
|
@ -758,22 +761,24 @@ const handlePreviewContract = async () => {
|
||||||
effectDate: form.value.effectDate,
|
effectDate: form.value.effectDate,
|
||||||
otherSupply: form.value.otherSupply,
|
otherSupply: form.value.otherSupply,
|
||||||
otherMatters: form.value.otherMatters,
|
otherMatters: form.value.otherMatters,
|
||||||
partBSign: form.value.signaturePath,
|
partBSign: form.value.signatureUrl,
|
||||||
message,
|
message,
|
||||||
signingDate: nowDate,
|
signingDate: nowDate,
|
||||||
faceUrl: videoInfo.value?.faceUrl || '',
|
faceUrl: videoInfo.value?.faceUrl || '',
|
||||||
messageTime: nowDateTime,
|
messageTime: nowDateTime,
|
||||||
shortMessage,
|
shortMessage,
|
||||||
proId: videoInfo.value?.proId,
|
proId: form.value?.proId,
|
||||||
contractTemplateType: 1, // 合同类型
|
contractTemplateType: videoInfo.value?.templateValue, // 合同类型
|
||||||
agreedMethod: videoInfo.value?.agreedMethod || '',
|
agreedMethod: videoInfo.value?.agreedMethod || '',
|
||||||
secondContent: videoInfo.value?.secondContent || '',
|
secondContent: videoInfo.value?.secondContent || '',
|
||||||
isXbg: form.value.isXbg,
|
isXbg: form.value.isXbg,
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('已组装的参数', params)
|
try {
|
||||||
|
const result = await previewContractAPI(params)
|
||||||
// const result = await previewContractAPI(params)
|
} catch (error) {
|
||||||
|
uni.$u.toast(error?.data?.obj || '预览失败')
|
||||||
|
}
|
||||||
|
|
||||||
// handlePreview(attachments.value[0])
|
// handlePreview(attachments.value[0])
|
||||||
}
|
}
|
||||||
|
|
@ -822,6 +827,7 @@ const handleGetWorkerInfo = async () => {
|
||||||
subName,
|
subName,
|
||||||
isXbg,
|
isXbg,
|
||||||
proName,
|
proName,
|
||||||
|
proId,
|
||||||
} = res
|
} = res
|
||||||
|
|
||||||
form.value.partyA = subName
|
form.value.partyA = subName
|
||||||
|
|
@ -835,6 +841,7 @@ const handleGetWorkerInfo = async () => {
|
||||||
form.value.isXbg = isXbg
|
form.value.isXbg = isXbg
|
||||||
form.value.workAdress = proName
|
form.value.workAdress = proName
|
||||||
form.value.workTask = postName
|
form.value.workTask = postName
|
||||||
|
form.value.proId = proId
|
||||||
|
|
||||||
getFileAddressParams.value.partA = subName
|
getFileAddressParams.value.partA = subName
|
||||||
getFileAddressParams.value.partB = name
|
getFileAddressParams.value.partB = name
|
||||||
|
|
@ -888,6 +895,7 @@ const handleConfirmSignature = async () => {
|
||||||
|
|
||||||
if (uploadRes.res === 1 && uploadRes.obj) {
|
if (uploadRes.res === 1 && uploadRes.obj) {
|
||||||
form.value.signaturePath = tempPath
|
form.value.signaturePath = tempPath
|
||||||
|
form.value.signatureUrl = uploadRes.ob
|
||||||
showSignatureModal.value = false
|
showSignatureModal.value = false
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(uploadRes.resMsg || '上传失败')
|
uni.$u.toast(uploadRes.resMsg || '上传失败')
|
||||||
|
|
|
||||||
|
|
@ -98,9 +98,9 @@ const templatePickerRef = ref(null)
|
||||||
|
|
||||||
// 合同模板选项(示例数据,后续可从接口获取)
|
// 合同模板选项(示例数据,后续可从接口获取)
|
||||||
const templateOptions = ref([
|
const templateOptions = ref([
|
||||||
{ text: '附件1-1-用工协议(普通人员)', value: 'template1' },
|
{ text: '附件1-1-用工协议(普通人员)', value: '1' },
|
||||||
{ text: '附件1-2-用工协议(技术人员)', value: 'template2' },
|
{ text: '附件1-2-用工协议(技术人员)', value: '2' },
|
||||||
{ text: '附件1-3-用工协议(管理人员)', value: 'template3' },
|
{ text: '附件1-3-用工协议(管理人员)', value: '3' },
|
||||||
])
|
])
|
||||||
|
|
||||||
const templateColumns = computed(() => {
|
const templateColumns = computed(() => {
|
||||||
|
|
@ -227,7 +227,9 @@ const handleNext = async () => {
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(uploadRes.resMsg || '上传失败')
|
uni.$u.toast(uploadRes.resMsg || '上传失败')
|
||||||
}
|
}
|
||||||
} catch (err) {}
|
} catch (err) {
|
||||||
|
console.log(err, '123')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue