refactor: edit get value
This commit is contained in:
parent
4ff7f50811
commit
0b648d8e45
1 changed files with 22 additions and 16 deletions
|
|
@ -201,23 +201,29 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
||||||
|
|
||||||
payDateEN: v.payDateEN,
|
payDateEN: v.payDateEN,
|
||||||
statusSave: true,
|
statusSave: true,
|
||||||
file: await customerStore.listAttachment(v.id).then(async (r) => {
|
file: await customerStore
|
||||||
if (r) {
|
.listAttachment({ parentId: v.id })
|
||||||
return await Promise.all(
|
.then(async (r) => {
|
||||||
r.map(async (item) => {
|
if (r) {
|
||||||
const fragment = item.split('-');
|
return await Promise.all(
|
||||||
const group = fragment.length === 1 ? 'other' : fragment.at(0);
|
r.map(async (item) => {
|
||||||
|
const fragment = item.split('-');
|
||||||
|
const group =
|
||||||
|
fragment.length === 1 ? 'other' : fragment.at(0);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url: await customerStore.getAttachment(v.id, item),
|
url: await customerStore.getAttachment({
|
||||||
name: item,
|
parentId: v.id,
|
||||||
group: group,
|
name: item,
|
||||||
};
|
}),
|
||||||
}),
|
name: item,
|
||||||
);
|
group: group,
|
||||||
}
|
};
|
||||||
return [];
|
}),
|
||||||
}),
|
);
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}),
|
||||||
})),
|
})),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue