From 439ab64f13b0233d006045afb194eaa09af83571 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期六, 25 四月 2026 17:42:56 +0800
Subject: [PATCH] Merge branch 'dev_NEW_pro' of http://114.132.189.42:9002/r/product-inventory-management into dev_NEW_pro

---
 src/components/ProjectManagement/ProgressReportDialog.vue |   48 ++++--------------------------------------------
 1 files changed, 4 insertions(+), 44 deletions(-)

diff --git a/src/components/ProjectManagement/ProgressReportDialog.vue b/src/components/ProjectManagement/ProgressReportDialog.vue
index d9402c2..51ebdf7 100644
--- a/src/components/ProjectManagement/ProgressReportDialog.vue
+++ b/src/components/ProjectManagement/ProgressReportDialog.vue
@@ -116,18 +116,7 @@
       </el-row>
 
       <el-form-item label="闄勪欢" prop="attachmentIds">
-        <el-upload
-          v-model:file-list="fileList"
-          :action="upload.url"
-          :headers="upload.headers"
-          multiple
-          name="files"
-          :on-success="handleUploadSuccess"
-          :on-error="handleUploadError"
-          :on-remove="handleRemove"
-        >
-          <el-button type="primary">涓婁紶鏂囦欢</el-button>
-        </el-upload>
+        <FileUpload v-model:file-list="form.storageBlobDTOs" />
       </el-form-item>
     </el-form>
 
@@ -144,6 +133,7 @@
 import { computed, reactive, ref, watch } from 'vue'
 import { ElMessage } from 'element-plus'
 import { getToken } from '@/utils/auth'
+import FileUpload from "@/components/AttachmentUpload/file/index.vue";
 
 const props = defineProps({
   modelValue: { type: Boolean, default: false },
@@ -161,11 +151,6 @@
 })
 
 const formRef = ref()
-const fileList = ref([])
-const upload = reactive({
-  url: import.meta.env.VITE_APP_BASE_API + '/basic/customer-follow/upload',
-  headers: { Authorization: 'Bearer ' + getToken() }
-})
 
 const form = ref({
   planNodeId: undefined,
@@ -180,7 +165,7 @@
   managerName: '',
   departmentName: '',
   remark: '',
-  attachmentIds: []
+  storageBlobDTOs: []
 })
 
 const rules = {
@@ -217,9 +202,8 @@
     managerName: info.managerName || '',
     departmentName: info.departmentName || '',
     remark: '',
-    attachmentIds: []
+    storageBlobDTOs: []
   }
-  fileList.value = []
 }
 
 watch(
@@ -237,30 +221,6 @@
   form.value.completionProgress = 100
   form.value.totalProgress = 100
   if (!form.value.actualEndTime) form.value.actualEndTime = form.value.reportDate || ''
-}
-
-function handleUploadError() {
-  ElMessage.error('涓婁紶鏂囦欢澶辫触')
-}
-
-function handleUploadSuccess(res, file) {
-  if (res?.code !== 200) {
-    ElMessage.error(res?.msg || '涓婁紶澶辫触')
-    return
-  }
-  const attachmentId = res?.data?.id ?? res?.data?.tempId ?? ''
-  if (!attachmentId) return
-  form.value.attachmentIds.push(attachmentId)
-  try {
-    file.attachmentId = attachmentId
-  } catch (e) {}
-  ElMessage.success('涓婁紶鎴愬姛')
-}
-
-function handleRemove(file) {
-  const attachmentId = file?.attachmentId
-  if (!attachmentId) return
-  form.value.attachmentIds = (form.value.attachmentIds || []).filter(id => id !== attachmentId)
 }
 
 async function submit() {

--
Gitblit v1.9.3