|
|
@@ -0,0 +1,72 @@
|
|
|
+<!-- 查询管理-订单管理-订单查询-详情 -->
|
|
|
+<template>
|
|
|
+ <app-drawer title="详情" width="960" v-model:show="show">
|
|
|
+ <app-table-details :data="data" :label-width="160" :cell-props="detailProps" :column="2" />
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="onCancel">{{ t('operation.close') }}</el-button>
|
|
|
+ </template>
|
|
|
+ </app-drawer>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts" setup>
|
|
|
+import { shallowRef, PropType } from 'vue'
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
+import { formatDate, parsePercent } from '@/filters'
|
|
|
+import { useEnum } from '@/hooks/enum'
|
|
|
+import { useRequest } from '@/hooks/request'
|
|
|
+import { queryOrderDetail } from '@/services/api/order'
|
|
|
+import { CellProp } from '@pc/components/base/table-details/types'
|
|
|
+import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
|
|
|
+import { i18n } from '@/stores'
|
|
|
+
|
|
|
+const props = defineProps({
|
|
|
+ record: {
|
|
|
+ type: Object as PropType<Model.OrderRsp>,
|
|
|
+ required: true
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const { global: { t } } = i18n
|
|
|
+const show = shallowRef(true)
|
|
|
+
|
|
|
+const buyOrSellEnum = useEnum('buyOrSell') // 方向
|
|
|
+
|
|
|
+const { data } = useRequest(queryOrderDetail, {
|
|
|
+ params: {
|
|
|
+ tradeid: props.record.tradeid
|
|
|
+ },
|
|
|
+ onError: (err) => {
|
|
|
+ ElMessage.error(err)
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const detailProps: CellProp[] = [
|
|
|
+ { prop: 'tradeid', label: '订单号' },
|
|
|
+ { prop: 'tradetimestr', label: '订单时间', formatValue: (val) => formatDate(val) },
|
|
|
+ { prop: 'accountname', label: '客户' },
|
|
|
+ { prop: 'goodscode', label: '商品/代码' },
|
|
|
+ { prop: 'buyorsell', label: '方向', formatValue: (val) => buyOrSellEnum.getEnumTypeName(val) },
|
|
|
+ { prop: 'membername', label: '所属机构' },
|
|
|
+ { prop: 'parentname', label: '上级机构' },
|
|
|
+ { prop: 'opennum', label: '原始数量' },
|
|
|
+ { prop: 'tradeamount', label: '原始金额' },
|
|
|
+ { prop: 'oripayeddeposit', label: '原始已付定金' },
|
|
|
+ { prop: 'orirestockdeposit', label: '原始补充定金' },
|
|
|
+ { prop: 'holderprice', label: '订单价格' },
|
|
|
+ { prop: 'holdernum', label: '订单数量' },
|
|
|
+ { prop: 'freezenum', label: '冻结数量' },
|
|
|
+ { prop: 'holderamount', label: '订单金额' },
|
|
|
+ { prop: 'payeddeposit', label: '已付定金' },
|
|
|
+ { prop: 'restockdeposit', label: '补充定金' },
|
|
|
+ { prop: 'promptdepositrate', label: '提示定金率', formatValue: (val) => parsePercent(val) },
|
|
|
+ { prop: 'adddepositrate', label: '追加定金率', formatValue: (val) => parsePercent(val) },
|
|
|
+ { prop: 'cutdepositrate', label: '斩仓定金率', formatValue: (val) => parsePercent(val) },
|
|
|
+ { prop: 'closeprice', label: '现价' },
|
|
|
+ { prop: 'floatpl', label: '浮动结余' },
|
|
|
+]
|
|
|
+
|
|
|
+const onCancel = () => {
|
|
|
+ show.value = false
|
|
|
+}
|
|
|
+</script>
|