更新采购申请前端

This commit is contained in:
吴红兵
2026-02-08 16:29:04 +08:00
parent 123c28b345
commit 5dc9b39cab
7 changed files with 502 additions and 2506 deletions

View File

@@ -356,23 +356,23 @@ function handleUploadSuccess(res: any, file: any) {
}
}
// 上传结束处理
// 上传结束处理:传出完整 fileList含 name便于父组件回显文件名
const uploadedSuccessfully = () => {
if (number.value > 0 && uploadList.value.length === number.value) {
fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value);
uploadList.value = [];
number.value = 0;
emit('update:modelValue', listToString(fileList.value));
emit('update:modelValue', fileList.value);
emit('change', listToString(fileList.value), fileList.value);
}
};
const handleRemove = (file: { name?: string }) => {
if (file.name) {
fileList.value = fileList.value.filter((f) => f.name !== file.name);
emit('update:modelValue', listToString(fileList.value));
emit('change', listToString(fileList.value), fileList.value);
}
const handleRemove = (file: { name?: string; id?: string; url?: string }) => {
fileList.value = fileList.value.filter(
(f) => !(f.id && f.id === file.id) && !(f.name && f.name === file.name)
);
emit('update:modelValue', fileList.value.length ? fileList.value : '');
emit('change', listToString(fileList.value), fileList.value);
};
const handlePreview = (file: any) => {