Commit f172d81f by cen

fix: 确认交车

1 parent 3d1dbf1e
......@@ -368,6 +368,11 @@ export default {
uni.showToast({ title: '请输入车钥匙数量', icon: 'none' })
return
}
console.log('this.formData', this.getImages({ key: 'otherUrl' }, 'upload'))
if (this.formData.otherText && (!this.getImages({ key: 'otherUrl' }, 'upload') || this.getImages({ key: 'otherUrl' }, 'upload').length == 0)) {
uni.showToast({ title: '请输入其他图片', icon: 'none' })
return
}
const requiredUploadFields = this.uploadFields.filter(field => field.required)
......@@ -662,6 +667,9 @@ export default {
content: '确定要删除这张图片吗?',
success: res => {
if (res.confirm && Array.isArray(this.uploadedImages[key])) {
if (key === 'otherUrl') {
this.formData.otherUrl = ''
}
// 使用splice确保响应式更新
this.uploadedImages[key].splice(index, 1)
// 如果数组为空,可以选择删除该字段
......@@ -674,7 +682,7 @@ export default {
},
// 预览PDF
previewPdf(field) {
const url = `/pages/evaluationForm/components/pdfPreView?fileUrl=${this.pdfUrl}&title=pdf&fileUrltype=pdf&Signature=true`
const url = `/pages/evaluationForm/components/pdfPreView?fileUrl=${this.pdfUrl}&title=pdf&fileUrltype=pdf`
uni.navigateTo({
url: `${url}`
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!