|
|
@ -25,7 +25,7 @@ |
|
|
|
</ContentWrap> |
|
|
|
<ContentWrap class="w-[27%] ml-16px"> |
|
|
|
<!-- 附件组件 --> |
|
|
|
<Annex :data="annexData" @handleImport="handleImport" @deleteAnnex="deleteAnnexSuccess" :upData="remarksData.data"/> |
|
|
|
<Annex :annexData="annexData" @handleAnnexSuccess="handleAnnexSuccess" @deleteAnnexSuccess="deleteAnnexSuccess" :upData="remarksData.data"/> |
|
|
|
<!-- 备注组件 --> |
|
|
|
<Remarks :remarksData="remarksData" class="mt-20px" |
|
|
|
@remarksSubmitScuess="remarksSubmitScuess" /> |
|
|
@ -42,6 +42,10 @@ import Remarks from '@/components/Remarks/src/Remarks.vue' |
|
|
|
import ChangeRecord from '@/components/ChangeRecord/src/ChangeRecord.vue' |
|
|
|
import Tabs from '@/components/Tabs/src/Tabs.vue' |
|
|
|
import * as DetailApi from '@/api/wms/detail' |
|
|
|
import * as FileApi from '@/api/wms/file' |
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
|
|
|
|
|
defineOptions({ name: 'Detail' }) |
|
|
@ -99,17 +103,7 @@ if (tabsList.value && tabsList.value.length > 0) { |
|
|
|
|
|
|
|
// 附件默认数据 |
|
|
|
const annexData = reactive({ |
|
|
|
annexList: [{ |
|
|
|
title: '文件名文件名2023-12-12.docx', |
|
|
|
size: '150.02KB', |
|
|
|
people: '贾先生', |
|
|
|
time: '2023年5月6日 17:16:00', |
|
|
|
}, { |
|
|
|
title: '文件名文件名2023-12-15.docx', |
|
|
|
size: '242KB', |
|
|
|
people: '张张', |
|
|
|
time: '2022年12月12日 17:16:00', |
|
|
|
}] |
|
|
|
annexList: [] |
|
|
|
}) |
|
|
|
|
|
|
|
// 备注数据 |
|
|
@ -142,29 +136,33 @@ const changeRecordData = reactive({ |
|
|
|
}] |
|
|
|
}) |
|
|
|
const detailData = ref("")//详情数据 |
|
|
|
|
|
|
|
// 导入成功之后 |
|
|
|
const importSuccess = () => {} |
|
|
|
|
|
|
|
/** 搜索按钮操作 */ |
|
|
|
const handleQuery = () => { |
|
|
|
importFormRef.value.open() |
|
|
|
} |
|
|
|
|
|
|
|
/** 重置按钮操作 */ |
|
|
|
const resetQuery = () => { |
|
|
|
queryParams.pageNo = 1 |
|
|
|
queryFormRef.value.resetFields() |
|
|
|
// 获取附件列表篇 |
|
|
|
const getFileList = async () => { |
|
|
|
detailLoading.value = true |
|
|
|
try { |
|
|
|
annexData.annexList = await FileApi.getFileList(remarksData.data) |
|
|
|
} finally { |
|
|
|
detailLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
/** 添加附件 */ |
|
|
|
const handleAnnexSuccess = () => { |
|
|
|
getFileList() |
|
|
|
getChangeRecordList() |
|
|
|
|
|
|
|
/** 用户导入 */ |
|
|
|
const importFormRef = ref() |
|
|
|
const handleImport = () => { |
|
|
|
importFormRef.value.open() |
|
|
|
} |
|
|
|
// 删除附件成功之后所走的方法 |
|
|
|
const deleteAnnexSuccess = async () => { |
|
|
|
const deleteAnnexSuccess = async (id) => { |
|
|
|
console.log('删除成功'); |
|
|
|
try { |
|
|
|
// 删除的二次确认 |
|
|
|
await message.delConfirm() |
|
|
|
// 发起删除 |
|
|
|
await FileApi.deleteFile(id) |
|
|
|
message.success(t('common.delSuccess')) |
|
|
|
getFileList() |
|
|
|
getChangeRecordList() |
|
|
|
} catch { } |
|
|
|
} |
|
|
|
|
|
|
|
// Tabs当前选择 |
|
|
@ -192,6 +190,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: |
|
|
|
try { |
|
|
|
detailData.value = row |
|
|
|
getRemarkList() |
|
|
|
getFileList() |
|
|
|
getChangeRecordList() |
|
|
|
|
|
|
|
} finally { |
|
|
|