|
|
@@ -5,36 +5,45 @@
|
|
|
<template #header>
|
|
|
<app-navbar title="详细" @back="closed" />
|
|
|
</template>
|
|
|
- <!-- <div v-if="detail" class="order-detail__container g-form__container">
|
|
|
- <CellGroup title="掉期委托信息"> -->
|
|
|
- <!-- <Cell title="商品" :value="detail.wrstandardname" /> -->
|
|
|
- <!-- <Cell title="参考价" :value="detail.tradeprice.toFixed(2)" />
|
|
|
- <Cell title="数量" :value="detail.tradeqty" />
|
|
|
- <Cell title="预付款(含定金)" :value="handleNumberValue(detail.payeddeposit.toFixed(2))" />
|
|
|
- <Cell title="付款比例" :value="parsePercent(detail.depositrate)" />
|
|
|
- <Cell title="预付金" :value="handleNumberValue(detail.transferprice.toFixed(2))" />
|
|
|
- <Cell title="实际价" :value="handleNumberValue(detail.lastprice.toFixed(2))" />
|
|
|
- <Cell title="尾款" :value="handleNumberValue(detail.remainamount.toFixed(2))" />
|
|
|
- <Cell title="状态" :value="detail.thjorderstatusdisplay" />
|
|
|
- <Cell title="采购时间" :value="formatDate(detail.tradetime)" />
|
|
|
- <Cell title="到期日期" :value="detail.enddate" /> -->
|
|
|
- <!-- </CellGroup>
|
|
|
+ <div v-if="selectedRow" class="order-detail__container g-form__container">
|
|
|
+ <CellGroup title="掉期委托信息">
|
|
|
+ <Cell title="商品代码/名称" :value="selectedRow.goodscode+'/'+selectedRow.goodsname"/>
|
|
|
+ <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
|
|
|
+ <Cell title="委托数量" :value="formatDecimal(selectedRow.orderqty)" />
|
|
|
+ <Cell title="委托价格" :value="formatDecimal(selectedRow.orderprice)" />
|
|
|
+ <Cell title="成交数量" :value="formatDecimal(selectedRow.tradeqty)" />
|
|
|
+ <Cell title="委托状态" :value="getWRTradeOrderStatusName(selectedRow.orderstatus)" />
|
|
|
+ <Cell title="委托时间" :value="formatDate(selectedRow.ordertime)" />
|
|
|
+ <Cell title="委托单号" :value="selectedRow.orderid" />
|
|
|
+ </CellGroup>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<Empty />
|
|
|
- </div> -->
|
|
|
+ </div>
|
|
|
+ <template #footer v-if="selectedRow.orderstatus === 3 || selectedRow.orderstatus === 7">
|
|
|
+ <Button type="primary" block round>撤销</Button>
|
|
|
+ </template>
|
|
|
</app-view>
|
|
|
</app-modal>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef } from 'vue'
|
|
|
+import { shallowRef, PropType } from 'vue'
|
|
|
import AppModal from '@/components/base/modal/index.vue'
|
|
|
-import { CellGroup } from 'vant'
|
|
|
+import { CellGroup, Cell, Button } from 'vant'
|
|
|
+import { getBuyOrSellName, getWRTradeOrderStatusName } from '@/constants/order'
|
|
|
+import { formatDate, formatDecimal } from '@/filters'
|
|
|
|
|
|
const showModal = shallowRef(true)
|
|
|
const refresh = shallowRef(false) // 是否刷新父组件数据
|
|
|
|
|
|
+const props = defineProps({
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<Model.TradeOrderDetailRsp>,
|
|
|
+ required: true,
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
// 关闭弹窗
|
|
|
const closed = (isRefresh = false) => {
|
|
|
refresh.value = isRefresh
|