From eee656c8d1aab0b5aa8935bf1630f782321fc7f4 Mon Sep 17 00:00:00 2001
From: zhouwenxuan <1175765986@qq.com>
Date: Wed, 21 Feb 2024 16:53:35 +0800
Subject: [PATCH] bug修改
---
src/views/safetyReview/projectManage/components/projectArchive.vue | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/views/safetyReview/projectManage/components/projectArchive.vue b/src/views/safetyReview/projectManage/components/projectArchive.vue
index 7b925a4..90be6e4 100644
--- a/src/views/safetyReview/projectManage/components/projectArchive.vue
+++ b/src/views/safetyReview/projectManage/components/projectArchive.vue
@@ -25,7 +25,7 @@
</el-table-column>
<el-table-column label="原因说明" align="center" class-name="small-padding fixed-width">
<template #default="scope">
- <el-input v-model="scope.row.remark" show-word-limit type="text" size="large"/>
+ <el-input v-model="scope.row.remark" show-word-limit type="text" size="large" />
</template>
</el-table-column>
<el-table-column label="附件上传" align="center" class-name="small-padding fixed-width">
@@ -203,13 +203,28 @@
const file = state.uploadList.map(item => {
return{
id: item.id ? item.id : null,
- fileId: item.fileList ? item.fileList[0].response ? item.fileList[0].response.data.id : item.fileList[0].id : '',
+ fileId: item.fileList && item.fileList.length>0 ? item.fileList[0].response ? item.fileList[0].response.data.id : item.fileList[0].id : '',
name: item.name,
type: item.type,
remark: item.remark,
projectId: val
}
})
+
+ let isOk = false;
+ try{
+ state.uploadList.forEach(item => {
+ if(item.type == 1 && (!item.fileList || item.fileList .length == 0) && item.remark == ""){
+ isOk = true;
+ throw Error();
+ }
+ })
+ }catch (e) {}
+
+ if(isOk){
+ ElMessage.warning("请完善原因说明或上传附件!");
+ return;
+ }
const { ...data} = JSON.parse(JSON.stringify(state.formData))
data.actualContractMoney = state.actualContract.actualContractMoney;
data.actualContractIntroduction = state.actualContract.actualContractIntroduction;
@@ -334,10 +349,10 @@
}
const res = await delAccessoryFile(accessoryFileId)
if(res.code == 200){
- ElMessage({
- type: 'success',
- message: '文件已删除'
- })
+ // ElMessage({
+ // type: 'success',
+ // message: '文件已删除'
+ // })
}else{
ElMessage({
type: 'warning',
--
Gitblit v1.9.2