wallet fix 2
This commit is contained in:
@@ -66,6 +66,14 @@
|
||||
@click="emits('weight', record)"
|
||||
/>
|
||||
</a-tooltip>
|
||||
<a-tooltip
|
||||
v-if="tahesabEnabled && record.tahesab_failed_id"
|
||||
class="cursor-pointer"
|
||||
@click="openTahesabRetry(record)"
|
||||
>
|
||||
<template #title><span>ارسال به تهحساب</span></template>
|
||||
<Icon icon="vuesax-linear:refresh-circle" color="#CA8A04" />
|
||||
</a-tooltip>
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</template>
|
||||
@@ -80,6 +88,14 @@
|
||||
@weight="(row) => emits('weight', row)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<TahesabRetryModal
|
||||
v-if="tahesabEnabled"
|
||||
v-model="tahesabRetryVisible"
|
||||
mode="retry-sanad"
|
||||
:tahesab-id="selectedTahesabId"
|
||||
@success="fetch"
|
||||
/>
|
||||
</BasicShowContext>
|
||||
</div>
|
||||
</template>
|
||||
@@ -98,6 +114,8 @@ import {getWithdrawTable, updateSts} from '@/api/wallet'
|
||||
import WithdrawMobileCardList from './WithdrawMobileCardList.vue'
|
||||
import { isMobile } from '@core/utils/is'
|
||||
import type { WithdrawFlowType } from '../types'
|
||||
import TahesabRetryModal from '@/components/TahesabRetryModal.vue'
|
||||
import { initTahesabSettingFromApi, tahesabEnabledSetting } from '@/utils/config'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -110,6 +128,9 @@ const props = withDefaults(
|
||||
|
||||
const [submit, reload] = useBaseTable()
|
||||
const mobileListRef = ref<null | { fetch: () => Promise<void> }>(null)
|
||||
const tahesabRetryVisible = ref(false)
|
||||
const selectedTahesabId = ref<number>()
|
||||
const tahesabEnabled = tahesabEnabledSetting
|
||||
/*const select = (val) => {
|
||||
val.sts === 1 ? return ['1'] : ['2']
|
||||
}*/
|
||||
@@ -166,6 +187,12 @@ async function changeCustomerActivationFunction(id: number) {
|
||||
async function fetch() {
|
||||
await Promise.allSettled([reload(), mobileListRef.value?.fetch?.() as Promise<void>])
|
||||
}
|
||||
|
||||
function openTahesabRetry(record: { tahesab_failed_id?: number }) {
|
||||
if (!record.tahesab_failed_id) return
|
||||
selectedTahesabId.value = record.tahesab_failed_id
|
||||
tahesabRetryVisible.value = true
|
||||
}
|
||||
// const spinTable = (val: boolean) => {
|
||||
// // console.log('sss')
|
||||
// table?.value?.loading.value = val
|
||||
@@ -175,6 +202,10 @@ defineExpose({
|
||||
getExportParams: () => ({ ...lastTableParams.value, flow_type: props.flowType })
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
void initTahesabSettingFromApi()
|
||||
})
|
||||
|
||||
import { status } from '@/pages/menuPages/withdraw/information/hooks/status'
|
||||
import {toNumber} from "lodash";
|
||||
const withdrawId = ref(null)
|
||||
|
||||
Reference in New Issue
Block a user