li.shaoyi hace 7 meses
padre
commit
2b5a3eb7e6

+ 1 - 1
public/config/appconfig.json

@@ -3,7 +3,7 @@
   "appName": "MTP",
   "version": "1.0.0",
   "versionCode": "10000",
-  "apiUrl": "http://192.168.30.188:8080",
+  "apiUrl": "http://192.168.31.210:5036",
   "tokenStore": "session",
   "loginVerifyCodeEnabled": true
 }

+ 72 - 0
src/packages/pc/views/query/order/list/components/details/index.vue

@@ -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>

+ 2 - 1
src/packages/pc/views/query/order/list/index.vue

@@ -62,7 +62,8 @@ const { componentMap, componentId, record, openComponent, closeComponent, getAct
 const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryOrder, {
     params: {
         pageNum: 1,
-        pageSize: 20
+        pageSize: 20,
+        validholderqty: 1
     },
     onError: (err) => {
         ElMessage.error(err)

+ 3 - 3
src/types/model/order.d.ts

@@ -1641,7 +1641,7 @@ declare namespace Model {
         decimalplace: number;
         deliverynum: number; // 交收数量
         deliveryqty: number;
-        depositratedisplay: number; // 风险率
+        depositratedisplay: string; // 风险率
         floatpl: string; // 浮动结余
         freezenum: string; // 冻结数量
         goodscode: string;
@@ -1690,7 +1690,7 @@ declare namespace Model {
         decimalplace: number;
         deliverynum: number; // 交收数量
         deliveryqty: number;
-        depositratedisplay: number; // 风险率
+        depositratedisplay: string; // 风险率
         floatpl: string; // 浮动结余
         freezenum: string; // 冻结数量
         goodscode: string;
@@ -1884,7 +1884,7 @@ declare namespace Model {
         buyorselldisplay: string; // 方向
         closepl: number; // 终止盈亏
         deliverynum: string; // 交收数量
-        depositratedisplay: number; // 风险率
+        depositratedisplay: string; // 风险率
         floatpl: number; // 浮动盈亏
         freezenum: string; // 冻结数量
         goodscode: string;