Browse Source

reactor:附件上传下载提示错误修复;

zhangchong 1 year ago
parent
commit
d8e176ad13

+ 3 - 2
src/components/AnnexList/index.vue

@@ -162,7 +162,8 @@ const handleRemove = (uploadFile: any) => {
 };
 // 下载
 const handleDownload = (uploadFile: any) => {
-	if (!uploadFile.path) {
+	const path = uploadFile.path ? uploadFile.path : uploadFile.response.result.path ? uploadFile.response.result.path : '';
+	if (!path) {
 		ElMessage.error('附件不存在');
 		return;
 	}
@@ -176,7 +177,7 @@ const handleDownload = (uploadFile: any) => {
 	})
 		.then(() => {
 			const fileName = uploadFile.name;
-			const url = import.meta.env.VITE_FILE_PREFIX + uploadFile.path;
+			const url = import.meta.env.VITE_FILE_PREFIX + path;
 			downloadFile(url, fileName);
 		})
 		.catch(() => {});

+ 1 - 1
src/components/OrderDetail/index.vue

@@ -798,7 +798,7 @@ const specialHandleOrderRef = ref<RefType>(); // 特提
 const onSpecialHandle = () => {
 	if (state.ruleForm.counterSignType || state.ruleForm.counterSignType === 0) {
 		// 会签工单无法进行特提
-		ElMessage.warning('工单会签中,无法进行特提!');
+		ElMessage.warning('工单会签中,请先结束会签!');
 		return;
 	}
 	specialHandleOrderRef.value.openDialog(state.ruleForm);

+ 4 - 0
src/views/business/return/index.vue

@@ -159,6 +159,10 @@ const onExport = () => {
 // 退回审批
 const orderReturnRef = ref<RefType>();
 const onAudit = (row: any) => {
+  if(row.counterSignType || row.counterSignType === 0){ // 会签工单无法进行特提
+    ElMessage.warning('工单会签中,请先结束会签!');
+    return;
+  }
 	orderReturnRef.value.openDialog(row, true);
 };
 // 查看退回详情

+ 1 - 1
src/views/business/special/index.vue

@@ -146,7 +146,7 @@ const onExport = () => {
 const specialApplyRef = ref<RefType>();
 const onSpecialApply = (row: any) => {
   if(row.counterSignType || row.counterSignType === 0){ // 会签工单无法进行特提
-    ElMessage.warning('工单会签中,无法进行特提!');
+    ElMessage.warning('工单会签中,请先结束会签!');
     return;
   }
 	specialApplyRef.value.openDialog(row); // 需要审核