gaoluyang
2026-02-09 6c01ab2761ffbfeb71acea02d741d9a24588e4d6
src/views/salesManagement/opportunityManagement/index.vue
@@ -9,8 +9,18 @@
            placeholder="请输入客户名称"
            clearable
            prefix-icon="Search"
            style="width: 200px"
            style="width: 200px;"
            @change="handleQuery"
          />
        </el-form-item>
        <el-form-item label="城市">
          <el-input
              v-model="searchForm.city"
              placeholder="请输入城市名称"
              clearable
              prefix-icon="Search"
              style="width: 200px"
              @change="handleQuery"
          />
        </el-form-item>
        <el-form-item label="录入日期:">
@@ -266,7 +276,7 @@
    </el-dialog>
    <!-- 附件列表对话框 -->
    <FileList ref="fileListRef" />
    <FileList ref="fileListRef" @refresh="handleFileListRefresh" />
  </div>
</template>
@@ -309,6 +319,7 @@
// 搜索表单
const searchForm = reactive({
  customerName: '',
  city: '',
  entryDate: [],
  entryDateStart: '',
  entryDateEnd: ''
@@ -338,6 +349,7 @@
// FileList组件引用
const fileListRef = ref(null)
const currentAttachmentRow = ref(null)
// 上传配置
const upload = reactive({
@@ -376,6 +388,7 @@
  { value: '新建', label: '新建' },
  { value: '项目跟踪', label: '项目跟踪' },
  { value: '合同签约', label: '合同签约' },
  { value: '备案申报', label: '备案申报' },
  { value: '项目交付', label: '项目交付' },
  { value: '项目验收', label: '项目验收' }
]
@@ -390,7 +403,8 @@
    '新建': 'info', 
    '项目跟踪': 'primary', 
    '合同签约': 'warning', 
    '项目交付': 'success',
    '备案申报': 'primary',
    '项目交付': 'success',
    '项目验收': 'success' 
  } 
  return typeMap[status] || 'info' 
@@ -402,7 +416,8 @@
    '新建': '新建', 
    '项目跟踪': '项目跟踪', 
    '合同签约': '合同签约', 
    '项目交付': '项目交付',
    '备案申报': '备案申报',
    '项目交付': '项目交付',
    '项目验收': '项目验收' 
  } 
  return textMap[status] || '未知' 
@@ -734,7 +749,7 @@
const resetForm = () => {
  Object.assign(form, {
    id: undefined,
    status: '新建',
    status: '',
    province: '',
    customerName: '',
    businessSource: '',
@@ -791,7 +806,24 @@
// 查看附件
function handleAttachment(row) {
   fileListRef.value.open(row.businessCommonFiles)
   currentAttachmentRow.value = row
   fileListRef.value.open(row.businessCommonFiles, row.id)
}
// 附件列表刷新
function handleFileListRefresh(rowId) {
   // 重新获取列表数据
   getList()
   // 等待列表数据更新后,找到对应的行并更新附件列表
   setTimeout(() => {
      if (currentAttachmentRow.value && tableData.value) {
         const updatedRow = tableData.value.find(item => item.id === currentAttachmentRow.value.id)
         if (updatedRow && updatedRow.businessCommonFiles) {
            currentAttachmentRow.value = updatedRow
            fileListRef.value.open(updatedRow.businessCommonFiles, updatedRow.id)
         }
      }
   }, 300)
}
onMounted(() => {