added pargar accounting

This commit is contained in:
2026-07-05 16:41:45 +03:30
parent 86e6c3c16f
commit 8d8be02d96
18 changed files with 1649 additions and 31 deletions
+15 -9
View File
@@ -111,26 +111,32 @@ function handelRemoveFile(index: number, size: string) {
}
async function handleSubmit() {
if (!id) {
message.error('شناسه بنر یافت نشد؛ صفحه را رفرش کنید')
return
}
try {
await updateBannerConst({
id: 14,
id,
value: JSON.stringify(benefitsList.value),
key: "header_banner"
key: 'header_banner',
})
message.success("اطلاعات با موفقیت ذخیره شد")
message.success('اطلاعات با موفقیت ذخیره شد')
} catch (error) {
message.error("خطا در ذخیره اطلاعات")
message.error('خطا در ذخیره اطلاعات')
}
}
onMounted(async () => {
try {
const res = await getHeaderBannerConst()
if (res?.length > 0) {
id = res[0].id || res[0].const_id || null
benefitsList.value = parseBannerList(res[0].value)
if (!res) {
return
}
id = res.id ?? res.const_id ?? null
benefitsList.value = parseBannerList(res.value)
} catch (error) {
console.error('خطا در دریافت بنرها:', error)
}
@@ -151,4 +157,4 @@ onMounted(async () => {
overflow-y: auto;
box-sizing: border-box;
}
</style>
</style>