diff --git a/src/model/wallet.ts b/src/model/wallet.ts index 986d4bd..11372f6 100644 --- a/src/model/wallet.ts +++ b/src/model/wallet.ts @@ -1,4 +1,5 @@ import type { User } from '@/model/user' +import type { Product } from "@/model/product"; export interface Wallet { owner: number @@ -22,6 +23,7 @@ export interface Withdraw { sts_str?: string daj?: string customer?: User + product?: Product } export interface Charge { diff --git a/src/pages/menuPages/withdraw/factor/index.vue b/src/pages/menuPages/withdraw/factor/index.vue index 045b1c3..c2f83c2 100644 --- a/src/pages/menuPages/withdraw/factor/index.vue +++ b/src/pages/menuPages/withdraw/factor/index.vue @@ -48,19 +48,19 @@ کد پستی {{ withdraw?.address?.zip }} --> -
+
-
+
diff --git a/src/pages/menuPages/withdraw/hooks/withdrawColumns.tsx b/src/pages/menuPages/withdraw/hooks/withdrawColumns.tsx index 622e67f..bb310f0 100644 --- a/src/pages/menuPages/withdraw/hooks/withdrawColumns.tsx +++ b/src/pages/menuPages/withdraw/hooks/withdrawColumns.tsx @@ -86,6 +86,18 @@ export const cols: BaseTableColumn[] = [ dataIndex: 'gold', key: 'gold', type: 'Number', + customRender: (data) => { + return data.record.gold ?? '_' + } + }, + { + title: 'تعداد', + dataIndex: 'number', + key: 'number', + type: 'Number', + customRender: (data) => { + return data.record.transaction[0].number ?? '_' + } }, { title: 'شماره کارت', diff --git a/src/pages/menuPages/withdraw/index.vue b/src/pages/menuPages/withdraw/index.vue index 68b7413..ef3910c 100644 --- a/src/pages/menuPages/withdraw/index.vue +++ b/src/pages/menuPages/withdraw/index.vue @@ -10,7 +10,6 @@ @withdraw="openWithdraw" @weight="openWeight" /> - @@ -49,31 +48,17 @@ />--> -
-
-
{{ item?.title }} ({{ (item.gold * -1) }} عدد)
- -
-
- - وزن جدید -
-
- - {{ item?.title }} {{ i }} - - ثبت -
-
+
+
برداشت فیزیکی ({{ confirmWithdraw.title }})
+
به وزن ({{ confirmWithdraw.amount }})
+
و قیمت ({{ usePrice(confirmWithdraw.price ?? 0, true, '') }})
-
@@ -99,6 +84,7 @@ import type { Order } from '@/model/order' import type { Wallet, Withdraw } from '@/model/wallet' import {completeWithdraw, sendWeights} from '@/api/wallet' import Button from "@core/components/BaseButton"; +import { usePrice } from "../../../core/utils/usePrice"; //import DatePicker from '@core/components/_sample/components/datePicker.vue' //loading @@ -269,11 +255,12 @@ async function okWithdraw() { }) } -const newWeightArray = ref([]) function openWeight(val) { - confirmWithdraw = val + confirmWithdraw = val.product + console.log('confirmWithdraw', confirmWithdraw) confirmWeightVisible.value = true } + function ok(i) { try { // await sendWeights() diff --git a/src/pages/menuPages/withdraw/information/hooks/status.ts b/src/pages/menuPages/withdraw/information/hooks/status.ts index b27d073..7f62764 100644 --- a/src/pages/menuPages/withdraw/information/hooks/status.ts +++ b/src/pages/menuPages/withdraw/information/hooks/status.ts @@ -12,7 +12,7 @@ export const status = { icon: 'vuesax-linear:profile-tick', color: '#2563EB', bgColor: '#DBEAFE', - title: 'ارسال شده' + title: 'دریافت شده' }, '52': { icon: 'vuesax-linear:empty-wallet-time',