|
|
@@ -0,0 +1,107 @@
|
|
|
+<!-- 持仓过户-我的转入 -->
|
|
|
+<template>
|
|
|
+ <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
|
|
|
+ :page-count="pageCount" @refresh="run">
|
|
|
+ <div class="g-order-list">
|
|
|
+ <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
|
|
|
+ <div class="g-order-list__titlebar">
|
|
|
+ <div class="left">
|
|
|
+ <h4>{{ item.goodsdisplay }}</h4>
|
|
|
+ <span>{{ item.applytime }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="right">
|
|
|
+ <span>{{ getTransferApplyStatusName(item.transferapplystatus) }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="g-order-list__content">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>转出方</span>
|
|
|
+ <span>{{ item.outusername }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>转让数量</span>
|
|
|
+ <span>{{ item.qty }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>转让价格</span>
|
|
|
+ <span>{{ item.transferprice }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>冻结天数</span>
|
|
|
+ <span>{{ item.freezedays }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>商品价格</span>
|
|
|
+ <span>{{ item.goodscurprice }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>手续费</span>
|
|
|
+ <span>{{ item.outcharge }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="g-order-list__btnbar">
|
|
|
+ <Button size="small" v-if="item.transferapplystatus === 2" @click="onCancelSumit(item)"
|
|
|
+ round>确认</Button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </app-pull-refresh>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts" setup>
|
|
|
+import { shallowRef } from 'vue'
|
|
|
+import { Button } from 'vant'
|
|
|
+import { useRequest } from '@/hooks/request'
|
|
|
+import { queryInTradePositionTransfer } from '@/services/api/transfer'
|
|
|
+import { getTransferApplyStatusName } from '@/constants/order'
|
|
|
+import { handleRequestBigNumber } from '@/filters'
|
|
|
+import { holderTransferConfirm } from '@/services/api/trade'
|
|
|
+import { dialog } from '@/utils/vant'
|
|
|
+import { fullloading } from '@/utils/vant'
|
|
|
+
|
|
|
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
|
+
|
|
|
+const dataList = shallowRef<Model.InTradePositionTransferRsp[]>([])
|
|
|
+const error = shallowRef(false)
|
|
|
+const pullRefreshRef = shallowRef()
|
|
|
+
|
|
|
+const { loading, pageIndex, pageCount, run } = useRequest(queryInTradePositionTransfer, {
|
|
|
+ params: {
|
|
|
+ pagesize: 20,
|
|
|
+ },
|
|
|
+ onSuccess: (res) => {
|
|
|
+ if (pageIndex.value === 1) {
|
|
|
+ dataList.value = []
|
|
|
+ }
|
|
|
+ dataList.value.push(...res.data)
|
|
|
+ },
|
|
|
+ onError: () => {
|
|
|
+ error.value = true
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const onCancelSumit = (item: Model.InTradePositionTransferRsp) => {
|
|
|
+ dialog({
|
|
|
+ message: '是否确认接收此转入请求?',
|
|
|
+ showCancelButton: true,
|
|
|
+ }).then(() => {
|
|
|
+ fullloading((hideLoading) => {
|
|
|
+ holderTransferConfirm({
|
|
|
+ data: {
|
|
|
+ Header: {
|
|
|
+ MarketID: item.marketid
|
|
|
+ },
|
|
|
+ ApplyID: handleRequestBigNumber(item.applyid)
|
|
|
+ }
|
|
|
+ }).then(() => {
|
|
|
+ hideLoading('确认成功')
|
|
|
+ pullRefreshRef.value?.refresh()
|
|
|
+ }).catch((err) => {
|
|
|
+ hideLoading(err, 'fail')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+</script>
|