This commit is contained in:
parent
175bf076f3
commit
03a9794dfa
|
|
@ -303,7 +303,7 @@ const submitCode = () => {
|
|||
console.log(taskInfo.value)
|
||||
if (maId.value == '') {
|
||||
uni.showToast({ title: '请先添加退料设备编码!', icon: 'none' })
|
||||
} else if(apDetection.value == '不合格') {
|
||||
} else if(apDetection.value == '不合格' && !bmFileInfos.value) {
|
||||
uni.showToast({ title: '请上传附件!', icon: 'none' })
|
||||
} else {
|
||||
// console.log(typeList.value)
|
||||
|
|
|
|||
|
|
@ -128,32 +128,32 @@ const preview = () => {
|
|||
// 拍照/上传
|
||||
const handlePhoto = () => {
|
||||
console.log('拍照/上传')
|
||||
// uni.chooseImage({
|
||||
// count: 1,
|
||||
// sizeType: ['compressed'],
|
||||
// sourceType: ['album', 'camera'],
|
||||
// success: (res) => {
|
||||
// console.log('🚀 ~ handlePhoto ~ res.tempFilePaths[0]:', res)
|
||||
// // imgPath.value = res.tempFilePaths[0]
|
||||
// // isRotate.value = false
|
||||
// signType.value = 1
|
||||
// uploadImg(res.tempFilePaths[0])
|
||||
// },
|
||||
// })
|
||||
uni.showActionSheet({
|
||||
itemList: ['拍照', '从相册选择'],
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: (res) => {
|
||||
if (res.tapIndex === 0) {
|
||||
getCamera()
|
||||
} else if (res.tapIndex === 1) {
|
||||
// 从相册选择
|
||||
getPhoto()
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('操作菜单选择失败:', err)
|
||||
console.log('🚀 ~ handlePhoto ~ res.tempFilePaths[0]:', res)
|
||||
// imgPath.value = res.tempFilePaths[0]
|
||||
// isRotate.value = false
|
||||
signType.value = 1
|
||||
uploadImg(res.tempFilePaths[0])
|
||||
},
|
||||
})
|
||||
// uni.showActionSheet({
|
||||
// itemList: ['拍照', '从相册选择'],
|
||||
// success: (res) => {
|
||||
// if (res.tapIndex === 0) {
|
||||
// getCamera()
|
||||
// } else if (res.tapIndex === 1) {
|
||||
// // 从相册选择
|
||||
// getPhoto()
|
||||
// }
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.error('操作菜单选择失败:', err)
|
||||
// },
|
||||
// })
|
||||
}
|
||||
// 拍照
|
||||
const getCamera = () => {
|
||||
|
|
@ -177,61 +177,61 @@ const onCameraError = (message) => {
|
|||
}
|
||||
const onCameraSuccess = (file) => {
|
||||
// const file1 = "data:image/jpeg;base64," + file;
|
||||
const file1 = file
|
||||
uni.showToast({ title: file, icon: 'none', duration: 20000 })
|
||||
uni.showModal({
|
||||
title: '是否上传图片',
|
||||
content: file,
|
||||
})
|
||||
let params = {
|
||||
image: file1,
|
||||
jiju_type: '',
|
||||
auth_lic:
|
||||
'xIWDlaDVdijcBB4mjhGCPYk5Kvk8tHZJbUn+vW+ih15+MYx98e/PXyBmKL5gFcWMPznLgDA15QuSAnZQSLddwdy9HkZgtuQDEEZZ351Eyb1eiDUccUnyoSGIrNimbx5TooBNNPYqU4qJeFrPJXAqjBHzRrxoBxuR2CEGKQPgHC4=',
|
||||
}
|
||||
console.log('🚀 ~ onCameraSuccess ~ params:', params)
|
||||
|
||||
// try {
|
||||
// const signUrl = params
|
||||
// if (opts.isLease) {
|
||||
// const params = {
|
||||
// id: opts.id,
|
||||
// leaseSignUrl: signUrl,
|
||||
// leaseSignType: signType.value,
|
||||
// }
|
||||
// console.log('🚀 ~ success: ~ params:', params)
|
||||
// updateLeaseApplyInfoSign(params).then((res) => {
|
||||
// console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
||||
// uni.navigateBack()
|
||||
// })
|
||||
// } else if (opts.isBack) {
|
||||
// const params = {
|
||||
// id: opts.id,
|
||||
// backSignUrl: signUrl,
|
||||
// backSignType: signType.value,
|
||||
// }
|
||||
// console.log('🚀 ~ success: ~ params:', params)
|
||||
// updateSignById(params).then((res) => {
|
||||
// console.log('🚀 ~ uploadImg-退料 ~ res:', res)
|
||||
// uni.navigateBack()
|
||||
// })
|
||||
// } else {
|
||||
// const params = {
|
||||
// signUrl: signUrl,
|
||||
// signType: signType.value,
|
||||
// }
|
||||
// updateSign(params).then((res) => {
|
||||
// console.log('🚀 ~ uploadImg-个人中心 ~ res:', res)
|
||||
// getSignData()
|
||||
// })
|
||||
// }
|
||||
// } catch (error) {
|
||||
// console.log('🚀 ~ uploadImg ~ error:', error)
|
||||
// uni.showToast({
|
||||
// title: '上传失败',
|
||||
// icon: 'none',
|
||||
// })
|
||||
// const file1 = file
|
||||
// uni.showToast({ title: file, icon: 'none', duration: 20000 })
|
||||
// uni.showModal({
|
||||
// title: '是否上传图片',
|
||||
// content: file,
|
||||
// })
|
||||
// let params = {
|
||||
// image: file1,
|
||||
// jiju_type: '',
|
||||
// auth_lic:
|
||||
// 'xIWDlaDVdijcBB4mjhGCPYk5Kvk8tHZJbUn+vW+ih15+MYx98e/PXyBmKL5gFcWMPznLgDA15QuSAnZQSLddwdy9HkZgtuQDEEZZ351Eyb1eiDUccUnyoSGIrNimbx5TooBNNPYqU4qJeFrPJXAqjBHzRrxoBxuR2CEGKQPgHC4=',
|
||||
// }
|
||||
// console.log('🚀 ~ onCameraSuccess ~ params:', params)
|
||||
|
||||
try {
|
||||
const signUrl = file
|
||||
if (opts.isLease) {
|
||||
const params = {
|
||||
id: opts.id,
|
||||
leaseSignUrl: signUrl,
|
||||
leaseSignType: signType.value,
|
||||
}
|
||||
console.log('🚀 ~ success: ~ params:', params)
|
||||
updateLeaseApplyInfoSign(params).then((res) => {
|
||||
console.log('🚀 ~ uploadImg-领料 ~ res:', res)
|
||||
uni.navigateBack()
|
||||
})
|
||||
} else if (opts.isBack) {
|
||||
const params = {
|
||||
id: opts.id,
|
||||
backSignUrl: signUrl,
|
||||
backSignType: signType.value,
|
||||
}
|
||||
console.log('🚀 ~ success: ~ params:', params)
|
||||
updateSignById(params).then((res) => {
|
||||
console.log('🚀 ~ uploadImg-退料 ~ res:', res)
|
||||
uni.navigateBack()
|
||||
})
|
||||
} else {
|
||||
const params = {
|
||||
signUrl: signUrl,
|
||||
signType: signType.value,
|
||||
}
|
||||
updateSign(params).then((res) => {
|
||||
console.log('🚀 ~ uploadImg-个人中心 ~ res:', res)
|
||||
getSignData()
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ uploadImg ~ error:', error)
|
||||
uni.showToast({
|
||||
title: '上传失败',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
}
|
||||
// 上传
|
||||
const uploadImg2 = async (base64Data) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue