预览合同接口调试完成
This commit is contained in:
parent
fcd6ce6ede
commit
5b199b5e78
|
|
@ -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 || '上传失败')
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue