|
|
@@ -9,7 +9,7 @@
|
|
|
</template>
|
|
|
</app-navbar>
|
|
|
</template>
|
|
|
- <Tabs v-model:active="tabIndex" @change="tabChange">
|
|
|
+ <Tabs v-model:active="tabIndex">
|
|
|
<Tab title="卖大厅">
|
|
|
</Tab>
|
|
|
<Tab title="买大厅">
|
|
|
@@ -18,19 +18,19 @@
|
|
|
<div class="trade">
|
|
|
<div class="trade-section sell" v-if="dataList.length">
|
|
|
<app-list :columns="columns" :data-list="dataList">
|
|
|
- <template>
|
|
|
- <Button size="small" round>摘牌</Button>
|
|
|
+ <template #operate="{ row }">
|
|
|
+ <Button size="small" round @click="onDelisting(row, tabIndex)">摘牌</Button>
|
|
|
</template>
|
|
|
</app-list>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ selectedRow }" @closed="closeComponent"
|
|
|
+ <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ selectedRow, tabIndex }" @closed="closeComponent"
|
|
|
v-if="componentId" />
|
|
|
</app-view>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, defineAsyncComponent } from 'vue'
|
|
|
+import { shallowRef, defineAsyncComponent, PropType } from 'vue'
|
|
|
import { Tab, Tabs, Button } from 'vant'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { useNavigation } from '@/hooks/navigation'
|
|
|
@@ -51,6 +51,13 @@ const selectedRow = shallowRef<Model.TjmdTradeOrderDetailRsp>()
|
|
|
const error = shallowRef(false)
|
|
|
const dataList = shallowRef<Model.TjmdTradeOrderDetailRsp[]>([])
|
|
|
|
|
|
+const props = defineProps({
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<Model.TjmdTradeOrderDetailRsp>,
|
|
|
+ required: true,
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
const { pageIndex } = useRequest(queryTjmdTradeOrderDetail, {
|
|
|
params: {
|
|
|
goodsid: goodsId,
|
|
|
@@ -73,8 +80,10 @@ const columns: Model.TableColumn[] = [
|
|
|
{ prop: 'username', label: '挂牌方' },
|
|
|
]
|
|
|
|
|
|
-const tabChange = (index: number) => {
|
|
|
- console.log('切换列表', index)
|
|
|
+const onDelisting = (row: Model.TjmdTradeOrderDetailRsp, value: number) => {
|
|
|
+ tabIndex.value = value
|
|
|
+ selectedRow.value = row
|
|
|
+ showComponent('delisting')
|
|
|
}
|
|
|
|
|
|
const onListing = () => {
|