|
|
|
@ -278,6 +278,7 @@
|
|
|
|
|
:headers="details.headers" |
|
|
|
|
:on-remove="handleRemove" |
|
|
|
|
:before-upload="handleBeforeUpload" |
|
|
|
|
:before-remove="handleBeforeRemove" |
|
|
|
|
:on-success="handleSiginImgSuccess" |
|
|
|
|
multiple |
|
|
|
|
> |
|
|
|
@ -658,6 +659,10 @@ const details = reactive<any>({
|
|
|
|
|
loadId: '', |
|
|
|
|
/** 在上传图片的中转批次号 */ |
|
|
|
|
carsNo: '', |
|
|
|
|
/** 是否为签收状态 */ |
|
|
|
|
isSign: false, |
|
|
|
|
/** 已上传的图片 */ |
|
|
|
|
oldImgArr: [], |
|
|
|
|
// 图片上传必须携带TOKEN |
|
|
|
|
headers: { 'Blade-Auth': 'Bearer ' + getToken() }, |
|
|
|
|
/** 异常信息 */ |
|
|
|
@ -1041,7 +1046,7 @@ const submitConfirmArrive = async () => {
|
|
|
|
|
/** 发车提交 */ |
|
|
|
|
const startCar = async () => { |
|
|
|
|
try { |
|
|
|
|
details.popUpShow.tipVisted = true; |
|
|
|
|
details.popUpShow.tipVisted = false; |
|
|
|
|
details.loadingObj.pageLoading = true; |
|
|
|
|
|
|
|
|
|
// const _arr = []; |
|
|
|
@ -1310,6 +1315,8 @@ const handleShowSiginImg = async ({ row }) => {
|
|
|
|
|
|
|
|
|
|
details.fileList = []; |
|
|
|
|
details.viewImgList = []; |
|
|
|
|
details.oldImgArr = []; |
|
|
|
|
details.isSign = Number(row.loadStatus) === 90 || Number(row.loadStatus) === 91 ? true : false; |
|
|
|
|
|
|
|
|
|
const res = await postTripartiteTransferFindSignPhoto({ loadId: row.id }); |
|
|
|
|
|
|
|
|
@ -1325,7 +1332,7 @@ const handleShowSiginImg = async ({ row }) => {
|
|
|
|
|
url: val.photoUrl, |
|
|
|
|
imgUrl: val.photoUrl, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
details.oldImgArr.push(val.photoUrl); |
|
|
|
|
details.viewImgList.push(val.photoUrl); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1368,6 +1375,15 @@ const handleBeforeUpload = async (rawFile: UploadRawFile) => {
|
|
|
|
|
return res; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 移除前检测 */ |
|
|
|
|
const handleBeforeRemove = rawFile => { |
|
|
|
|
const _flag = !details.isSign ? !details.oldImgArr.includes(rawFile.imgUrl) : true; |
|
|
|
|
|
|
|
|
|
!_flag && ElMessage.warning('已签收,无法删除已提交的图片'); |
|
|
|
|
|
|
|
|
|
return _flag; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 上传成功 */ |
|
|
|
|
const handleSiginImgSuccess = (response: any, uploadFile: UploadFile, uploadFiles: UploadFiles) => { |
|
|
|
|
details.viewImgList = details.fileList.map(val => val.url); |
|
|
|
|