From e5a76193b73cc10ad649d74fc5d7b45ea06b2ca6 Mon Sep 17 00:00:00 2001 From: safavimohadeseh78 Date: Tue, 3 Feb 2026 18:24:45 +0330 Subject: [PATCH] add shemshParnia to products --- components.d.ts | 1 + src/components/BasicImageUploader.vue | 104 ++++++++++++++++++++ src/pages/dashboard/index.vue | 10 +- src/pages/menuPages/products/base/index.vue | 80 +++++++-------- 4 files changed, 152 insertions(+), 43 deletions(-) create mode 100644 src/components/BasicImageUploader.vue diff --git a/components.d.ts b/components.d.ts index ab8d35f..7f20e62 100644 --- a/components.d.ts +++ b/components.d.ts @@ -58,6 +58,7 @@ declare module '@vue/runtime-core' { BaseTable: typeof import('./src/core/components/BaseTable/index.ts')['default'] BaseTableOld: typeof import('./src/core/components/BaseTableOld/index.ts')['default'] BasicCard: typeof import('./src/components/BasicCard.vue')['default'] + BasicImageUploader: typeof import('./src/components/BasicImageUploader.vue')['default'] BasicInfoItem: typeof import('./src/components/BasicInfoItem.vue')['default'] BasicInput: typeof import('./src/components/BasicInput.vue')['default'] BasicMainCard: typeof import('./src/components/BasicMainCard.vue')['default'] diff --git a/src/components/BasicImageUploader.vue b/src/components/BasicImageUploader.vue new file mode 100644 index 0000000..08aab36 --- /dev/null +++ b/src/components/BasicImageUploader.vue @@ -0,0 +1,104 @@ + + + \ No newline at end of file diff --git a/src/pages/dashboard/index.vue b/src/pages/dashboard/index.vue index 856d577..5cef7b9 100644 --- a/src/pages/dashboard/index.vue +++ b/src/pages/dashboard/index.vue @@ -108,7 +108,7 @@ - +
@@ -199,12 +199,13 @@
+
تراز بدهی
- +
مقایسه قیمت ها
-
+ +
-
+
{{ usePrice(123456789123, true, '') }}
diff --git a/src/pages/menuPages/products/base/index.vue b/src/pages/menuPages/products/base/index.vue index 70cc71b..fdca45d 100644 --- a/src/pages/menuPages/products/base/index.vue +++ b/src/pages/menuPages/products/base/index.vue @@ -69,11 +69,11 @@
-
+
قیمت :
- - -
@@ -182,6 +179,24 @@ @delete="deleteFile" />
+ + @@ -389,28 +404,29 @@ import Icon from "@core/components/BaseIcon/src/Icon.vue"; import type { MethodePrices, Product } from "@/model/product"; import IndexImageUploader from "@/components/ProductUploader/IndexImageUploader.vue"; import ProductImageUploader from "@/components/ProductUploader/ProductImageUploader.vue"; +import {baseURL} from '@root/config' //tabs const activeKey = ref("اطلاعات جامع"); //loading -const loading = ref(false); +const loading = ref(false) //define store -const store = useStaticApiListsStore(); +const store = useStaticApiListsStore() //define tbl -const table = ref(null); -const orderTable = ref(null); -const transactionTable = ref(null); -const smsTable = ref(null); -const referralTable = ref(null); -const fundTable = ref(null); -const refreshTable = () => table?.value?.fetch(); -const refreshOrderTable = () => orderTable?.value?.fetch(); -const refreshTransactionTable = () => transactionTable?.value?.fetch(); -const refreshSMSTable = () => smsTable?.value?.fetch(); -const refreshReferralTable = () => referralTable?.value?.fetch(); +const table = ref(null) +const orderTable = ref(null) +const transactionTable = ref(null) +const smsTable = ref(null) +const referralTable = ref(null) +const fundTable = ref(null) +const refreshTable = () => table?.value?.fetch() +const refreshOrderTable = () => orderTable?.value?.fetch() +const refreshTransactionTable = () => transactionTable?.value?.fetch() +const refreshSMSTable = () => smsTable?.value?.fetch() +const refreshReferralTable = () => referralTable?.value?.fetch() const refreshFundTable = () => fundTable?.value?.fetch(); const methodOption = ref("1"); const weightOption = ref("1"); @@ -438,12 +454,12 @@ const ProductIndexImage = ref>([]); function uploadedIndexFile(id: number) { // console.log(id) - form.value.file_id = id; + form.value.original_image_id = id; } function deleteIndexFile() { - form.value.file_id = null; - form.value.file_id = null; + form.value.original_image_id = null; + form.value.original_image = null; ProductIndexImage.value = []; } @@ -610,20 +626,6 @@ async function edit(record: Customer) { form.value.auto_open_at = dayjs(customForm.auto_open_at, "HH:mm:ss"); form.value.auto_close_at = dayjs(customForm.auto_close_at, "HH:mm:ss"); - - // نمایش فایل موجود اگر وجود داشته باشد - const file = (record as any).file; - if (file && file.src) { - ProductIndexImage.value = [{ - uid: `file-${file.id}`, - name: file.original_name || `index-image-${file.id}`, - url: file.src, - src: file.src, - status: 'done' as const - }] as any; - } else { - ProductIndexImage.value = []; - } } //add @@ -691,8 +693,6 @@ const resetData = () => { percent_fee_sell: 0, cash_fee_sell: 0 }; - ProductIndexImage.value = []; - ImageFileList.value = []; }; //delete @@ -795,9 +795,11 @@ const categoryItems: Array = [ }, { value: "شمش ونوس" + }, + { + value: "شمش پرنیا" } - -]; +] const data = ref([]); const fetchData = async () => {