change withdraw list
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user