|
@@ -1,12 +1,87 @@
|
|
|
<!-- 委托记录-现货仓单-历史记录 -->
|
|
<!-- 委托记录-现货仓单-历史记录 -->
|
|
|
<template>
|
|
<template>
|
|
|
- <app-table :data="[]" v-model:columns="tableColumns" />
|
|
|
|
|
|
|
+ <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
|
|
|
|
|
+ <template #header>
|
|
|
|
|
+ <app-filter :options="filterOptons" :loading="loading">
|
|
|
|
|
+ <template #before>
|
|
|
|
|
+ <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"
|
|
|
|
|
+ v-model="filterDate" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </app-filter>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 类型 -->
|
|
|
|
|
+ <template #wrtradetype="{ value }">
|
|
|
|
|
+ {{ getWrTradeTypeName(value) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 挂牌方式 -->
|
|
|
|
|
+ <template #wrpricetype="{ value }">
|
|
|
|
|
+ {{ getWrPriceTypeName(value) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 委托时间 -->
|
|
|
|
|
+ <template #ordertime="{ value }">
|
|
|
|
|
+ {{ formatDate(value) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 状态 -->
|
|
|
|
|
+ <template #wrtradeorderstatus="{ value }">
|
|
|
|
|
+ {{ getWRTradeOrderStatusName(value) }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </app-table>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef } from 'vue'
|
|
|
|
|
|
|
+import { shallowRef, reactive } from 'vue'
|
|
|
|
|
+import { formatDate } from '@/filters'
|
|
|
|
|
+import { useDataFilter } from '@/hooks/datatable'
|
|
|
|
|
+import { useRequest } from '@/hooks/request'
|
|
|
|
|
+import { queryWrOrderDetail } from '@/services/api/order'
|
|
|
|
|
+import { getWrTradeTypeName, getWrPriceTypeName, getWRTradeOrderStatusName } from '@/constants/order'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
|
|
+import AppFilter from '@pc/components/base/table-filter/index.vue'
|
|
|
|
|
+
|
|
|
|
|
+const { filterOptons, getQueryParams } = useDataFilter<Model.WrOrderDetailRsp>()
|
|
|
|
|
+const filterDate = shallowRef<string[]>([])
|
|
|
|
|
+
|
|
|
|
|
+const formData = reactive<Model.WrOrderDetailReq>({
|
|
|
|
|
+ wrtradetype: 1,
|
|
|
|
|
+ marketid: 17201,
|
|
|
|
|
+ haswr: 1,
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const { loading, dataList, run } = useRequest(queryWrOrderDetail, {
|
|
|
|
|
+ params: {
|
|
|
|
|
+ ...formData
|
|
|
|
|
+ },
|
|
|
|
|
+})
|
|
|
|
|
|
|
|
const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
const tableColumns = shallowRef<Model.TableColumn[]>([
|
|
|
|
|
+ { prop: 'wrtradeorderid', label: '挂牌单号' },
|
|
|
|
|
+ { prop: 'wrtradetype', label: '挂牌类型' },
|
|
|
|
|
+ { prop: 'deliverygoodsname', label: '品种' },
|
|
|
|
|
+ { prop: 'wrstandardname', label: '商品' },
|
|
|
|
|
+ { prop: 'warehousename', label: '仓库' },
|
|
|
|
|
+ { prop: 'wrpricetype', label: '挂牌方式' },
|
|
|
|
|
+ { prop: 'wrtypename', label: '期货合约' },
|
|
|
|
|
+ { prop: 'fixedprice', label: '价格/基差' },
|
|
|
|
|
+ { prop: 'orderqty', label: '挂牌数量' },
|
|
|
|
|
+ { prop: 'tradeqty', label: '成交数量' },
|
|
|
|
|
+ { prop: 'ordertime', label: '挂牌时间' },
|
|
|
|
|
+ { prop: 'wrtradeorderstatus', label: '状态' },
|
|
|
])
|
|
])
|
|
|
|
|
+
|
|
|
|
|
+filterOptons.buttonList = [
|
|
|
|
|
+ { lable: '重置', onClick: () => onSearch(true) },
|
|
|
|
|
+ { lable: '查询', className: 'el-button--primary', onClick: () => onSearch() }
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
|
|
+const onSearch = (clear = false) => {
|
|
|
|
|
+ if (clear) {
|
|
|
|
|
+ filterDate.value = []
|
|
|
|
|
+ }
|
|
|
|
|
+ getQueryParams((qs) => {
|
|
|
|
|
+ qs.begindate = filterDate.value[0]
|
|
|
|
|
+ qs.enddate = filterDate.value[1]
|
|
|
|
|
+ run(qs)
|
|
|
|
|
+ }, clear)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|