change withdraw list
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -48,19 +48,19 @@
|
||||
<span class="text-xs font-medium text-gray-500">کد پستی</span>
|
||||
<span class="text-sm font-medium text-gray-700">{{ withdraw?.address?.zip }}</span>
|
||||
</div>-->
|
||||
<div class="col-span-1 flex items-center gap-2">
|
||||
<!-- <div class="col-span-1 flex items-center gap-2">
|
||||
<span class="text-xs font-medium text-gray-500">استان</span>
|
||||
<span class="text-sm font-medium text-gray-700">{{ withdraw?.address?.province }}</span>
|
||||
</div>
|
||||
<div class="col-span-1 flex items-center gap-2">
|
||||
<span class="text-xs font-medium text-gray-500">شهر</span>
|
||||
<span class="text-sm font-medium text-gray-700">{{ withdraw?.address?.city }}</span>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<!-- <div class="flex items-center gap-2">
|
||||
<span class="text-xs font-medium text-gray-500">آدرس</span>
|
||||
<span class="text-sm font-medium text-gray-700">{{ withdraw?.address?.address }}</span>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<ADivider class="!my-4" />
|
||||
<div class="h-7 grid grid grid-cols-10 bg-[#091A38] rounded-t-lg">
|
||||
|
||||
@@ -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: 'شماره کارت',
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
@withdraw="openWithdraw"
|
||||
@weight="openWeight"
|
||||
/>
|
||||
|
||||
<!-- <BasicMenu :menu="menu" width="13rem" @onChange="tabSelected" />
|
||||
<component :is="selectedComponent" class="mr-5" />-->
|
||||
<!-- <BasicShowContext title="پروژه ها"> <Search /> </BasicShowContext>-->
|
||||
@@ -49,31 +48,17 @@
|
||||
/>-->
|
||||
<BasicModal
|
||||
v-model:visible="confirmWeightVisible"
|
||||
width="40rem"
|
||||
title="ثبت اطلاعات"
|
||||
width="30rem"
|
||||
title="اطلاعات برداشت فیزیکی"
|
||||
:loading="loading"
|
||||
custom-footer
|
||||
@close="confirmWeightVisible = false"
|
||||
>
|
||||
<div v-for="(item, index) in confirmWithdraw?.transaction">
|
||||
<div class="bg-gray-100 rounded-lg p-4 mt-2">
|
||||
<div class="mb-4">{{ item?.title }} ({{ (item.gold * -1) }} عدد)</div>
|
||||
<ADivider class="!my-0 "/>
|
||||
<div v-if="item.gold && item.gold * -1 > 0">
|
||||
<div class="h-7 grid grid grid-cols-3">
|
||||
<span class="col-span-1 flex "></span>
|
||||
<span class="col-span-1 flex justify-center">وزن جدید</span>
|
||||
</div>
|
||||
<div v-for="i in Math.abs(item.gold * -1)" class="grid grid-cols-3 gap-2 mb-2" >
|
||||
<!-- <span class="col-span-1 text-xs font-medium py-[8px] px-[10px]">{{
|
||||
i
|
||||
}}</span>-->
|
||||
<span class="col-span-1 text-xs font-medium py-[8px] px-[10px]">{{ item?.title }} {{ i }}</span>
|
||||
<BasicInput class="col-span-1 text-xs font-medium w-10rem" v-model:value="newWeightArray[i]" />
|
||||
<BaseButton class="col-span-1 text-xs font-medium w-4rem mr-4" @click="ok(i)">ثبت</BaseButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" bg-gray-100 rounded-lg p-2">
|
||||
<div class="mb-4">برداشت فیزیکی ({{ confirmWithdraw.title }})</div>
|
||||
<div class="mb-4 mr-1"> به وزن ({{ confirmWithdraw.amount }})</div>
|
||||
<div class="mb-4 mr-1"> و قیمت ({{ usePrice(confirmWithdraw.price ?? 0, true, '') }})</div>
|
||||
</div>
|
||||
</div>
|
||||
</BasicModal>
|
||||
</div>
|
||||
</template>
|
||||
@@ -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()
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user