瀏覽代碼

代码提交

Handy_Cao 2 年之前
父節點
當前提交
9db8a174ca

+ 25 - 0
src/constants/order.ts

@@ -45,6 +45,12 @@ export enum PayStatus {
     Pay = 2,
 }
 
+/// 付款方式 - 1:冻结 2:扣款
+export enum PaymentType {
+    Freeze = 1,
+    Blance = 2,
+}
+
 /**
  * 获取买卖方向列表
  * @returns 
@@ -79,6 +85,17 @@ export function getWRPriceTypeList() {
     ]
 }
 
+/**
+ * 获取仓单贸易付款方式 
+ * @returns 
+ */
+export function getPaymentTypeList() {
+    return [
+        { label: '冻结', value: PaymentType.Freeze},
+        { label: '扣款', value: PaymentType.Blance },
+    ]
+}
+
 
 /**
  * 获取买卖方向名称
@@ -98,6 +115,14 @@ export function getWrTradeTypeName(value: number) {
 }
 
 /**
+ * 获取仓单贸易付款方式 
+ * @returns 
+ */
+export function getPaymentTypeName(value: number) {
+    return getEnumTypeName(getPaymentTypeList(), value)
+}
+
+/**
  * 获取仓单贸易价格类型名称
  * @returns 
  */

+ 45 - 1
src/packages/pc/views/query/capital/history/index.vue

@@ -1,12 +1,56 @@
 <!-- 资金流水-历史记录 -->
 <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 #createtime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { useDataFilter } from '@/hooks/datatable'
+import { useRequest } from '@/hooks/request'
+import { queryHisAmountLog } from '@/services/api/bank'
 import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter/index.vue'
+
+const { filterOptons, getQueryParams } = useDataFilter<Model.HisTradeOrderDetailReq>()
+const filterDate = shallowRef<string[]>([])
+
+const { loading, dataList, run } = useRequest(queryHisAmountLog, {})
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'accountid', label: '资金账号' },
+    { prop: 'operatetypename', label: '资金类型' },
+    { prop: 'amount', label: '金额' },
+    { prop: 'currentbalance', label: '余额' },
+    { prop: 'createtime', 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.startDate = filterDate.value[0]
+        qs.endDate = filterDate.value[1]
+        run(qs)
+    }, clear)
+}
 </script>

+ 16 - 1
src/packages/pc/views/query/capital/list/index.vue

@@ -1,12 +1,27 @@
 <!-- 资金流水-当前记录 -->
 <template>
-    <app-table :data="[]" v-model:columns="tableColumns" />
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+        <!-- 委托时间 -->
+        <template #createtime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryAmountLog } from '@/services/api/bank'
 import AppTable from '@pc/components/base/table/index.vue'
 
+const { loading, dataList } = useRequest(queryAmountLog, {})
+
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'accountid', label: '资金账号' },
+    { prop: 'operatetypename', label: '资金类型' },
+    { prop: 'amount', label: '金额' },
+    { prop: 'currentbalance', label: '余额' },
+    { prop: 'createtime', label: '时间' }
 ])
 </script>

+ 44 - 1
src/packages/pc/views/query/performance/buy/all/index.vue

@@ -1,12 +1,55 @@
 <!-- 资金流水-买履约-全部 -->
 <template>
-    <app-table :data="[]" v-model:columns="tableColumns" />
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+         <!-- 履约状态 -->
+         <template #performancestatus="{ value }">
+            {{ getPerformanceStatusName(value) }}
+        </template>
+        <!-- 履约类型 -->
+        <template #performancetype="{ value }">
+            {{ getPerformanceTypeName(value) }}
+        </template>
+        <!-- 履约类型 -->
+        <template #paymenttype="{ value }">
+            {{ getPaymentTypeName(value) }}
+        </template>
+        <!-- 委托时间 -->
+        <template #starttime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryPerformancePlan } from '@/services/api/performance'
+import { BuyOrSell, getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 
+
+const { loading, dataList } = useRequest(queryPerformancePlan, {
+    params: {
+        buyorsell: BuyOrSell.Buy
+    },
+})
+
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'deliverygoodsname', label: '品种' },
+    { prop: 'wrstandardname', label: '商品' },
+    { prop: 'performancetype', label: '类型' },
+    { prop: 'relatedorderid', label: '关联单号' },
+    { prop: 'paymenttype', label: '付款方式' },
+    { prop: 'buyerfreezeamount', label: '履约冻结' },
+    { prop: 'buyerfreezeamountremain', label: '履约冻结剩余' },
+    { prop: 'amount', label: '总金额' },
+    { prop: 'buypaidamount', label: '已付金额' },
+    { prop: 'overshortamount', label: '溢短金额' },
+    { prop: 'sellusername', label: '卖方' },
+    { prop: 'performancestatus', label: '履约状态' },
+    { prop: 'curstepname', label: '当前步骤' },
+    { prop: 'starttime', label: '开始时间' },
+    
 ])
 </script>

+ 45 - 1
src/packages/pc/views/query/performance/buy/running/index.vue

@@ -1,12 +1,56 @@
 <!-- 资金流水-买履约-执行中 -->
 <template>
-    <app-table :data="[]" v-model:columns="tableColumns" />
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+        <!-- 履约状态 -->
+        <template #performancestatus="{ value }">
+            {{ getPerformanceStatusName(value) }}
+        </template>
+        <!-- 履约类型 -->
+        <template #performancetype="{ value }">
+            {{ getPerformanceTypeName(value) }}
+        </template>
+        <!-- 履约类型 -->
+        <template #paymenttype="{ value }">
+            {{ getPaymentTypeName(value) }}
+        </template>
+        <!-- 委托时间 -->
+        <template #starttime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryPerformancePlan } from '@/services/api/performance'
+import { BuyOrSell, getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 
+
+const { loading, dataList } = useRequest(queryPerformancePlan, {
+    params: {
+        buyorsell: BuyOrSell.Buy,
+        status: '2'
+    },
+})
+
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'deliverygoodsname', label: '品种' },
+    { prop: 'wrstandardname', label: '商品' },
+    { prop: 'performancetype', label: '类型' },
+    { prop: 'relatedorderid', label: '关联单号' },
+    { prop: 'paymenttype', label: '付款方式' },
+    { prop: 'buyerfreezeamount', label: '履约冻结' },
+    { prop: 'buyerfreezeamountremain', label: '履约冻结剩余' },
+    { prop: 'amount', label: '总金额' },
+    { prop: 'buypaidamount', label: '已付金额' },
+    { prop: 'overshortamount', label: '溢短金额' },
+    { prop: 'sellusername', label: '卖方' },
+    { prop: 'performancestatus', label: '履约状态' },
+    { prop: 'curstepname', label: '当前步骤' },
+    { prop: 'starttime', label: '开始时间' },
+    
 ])
 </script>

+ 44 - 1
src/packages/pc/views/query/performance/sell/all/index.vue

@@ -1,12 +1,55 @@
 <!-- 资金流水-卖履约-全部 -->
 <template>
-    <app-table :data="[]" v-model:columns="tableColumns" />
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+         <!-- 履约状态 -->
+         <template #performancestatus="{ value }">
+            {{ getPerformanceStatusName(value) }}
+        </template>
+        <!-- 履约类型 -->
+        <template #performancetype="{ value }">
+            {{ getPerformanceTypeName(value) }}
+        </template>
+        <!-- 履约类型 -->
+        <template #paymenttype="{ value }">
+            {{ getPaymentTypeName(value) }}
+        </template>
+        <!-- 委托时间 -->
+        <template #starttime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryPerformancePlan } from '@/services/api/performance'
+import { BuyOrSell, getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 
+
+const { loading, dataList } = useRequest(queryPerformancePlan, {
+    params: {
+        buyorsell: BuyOrSell.Sell
+    },
+})
+
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'deliverygoodsname', label: '品种' },
+    { prop: 'wrstandardname', label: '商品' },
+    { prop: 'performancetype', label: '类型' },
+    { prop: 'relatedorderid', label: '关联单号' },
+    { prop: 'paymenttype', label: '付款方式' },
+    { prop: 'sellerfreezeamount', label: '履约冻结' },
+    { prop: 'sellerfreezeamountremain', label: '履约冻结剩余' },
+    { prop: 'amount', label: '总金额' },
+    { prop: 'sellreceivedamount', label: '已收金额' },
+    { prop: 'overshortamount', label: '溢短金额' },
+    { prop: 'buyusername', label: '买方' },
+    { prop: 'performancestatus', label: '履约状态' },
+    { prop: 'curstepname', label: '当前步骤' },
+    { prop: 'starttime', label: '开始时间' },
+    
 ])
 </script>

+ 45 - 1
src/packages/pc/views/query/performance/sell/running/index.vue

@@ -1,12 +1,56 @@
 <!-- 资金流水-卖履约-执行中 -->
 <template>
-    <app-table :data="[]" v-model:columns="tableColumns" />
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+         <!-- 履约状态 -->
+         <template #performancestatus="{ value }">
+            {{ getPerformanceStatusName(value) }}
+        </template>
+        <!-- 履约类型 -->
+        <template #performancetype="{ value }">
+            {{ getPerformanceTypeName(value) }}
+        </template>
+        <!-- 履约类型 -->
+        <template #paymenttype="{ value }">
+            {{ getPaymentTypeName(value) }}
+        </template>
+        <!-- 委托时间 -->
+        <template #starttime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryPerformancePlan } from '@/services/api/performance'
+import { BuyOrSell, getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 
+
+const { loading, dataList } = useRequest(queryPerformancePlan, {
+    params: {
+        buyorsell: BuyOrSell.Sell,
+        status:'2'
+    },
+})
+
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'deliverygoodsname', label: '品种' },
+    { prop: 'wrstandardname', label: '商品' },
+    { prop: 'performancetype', label: '类型' },
+    { prop: 'relatedorderid', label: '关联单号' },
+    { prop: 'paymenttype', label: '付款方式' },
+    { prop: 'sellerfreezeamount', label: '履约冻结' },
+    { prop: 'sellerfreezeamountremain', label: '履约冻结剩余' },
+    { prop: 'amount', label: '总金额' },
+    { prop: 'sellreceivedamount', label: '已收金额' },
+    { prop: 'overshortamount', label: '溢短金额' },
+    { prop: 'buyusername', label: '买方' },
+    { prop: 'performancestatus', label: '履约状态' },
+    { prop: 'curstepname', label: '当前步骤' },
+    { prop: 'starttime', label: '开始时间' },
+    
 ])
 </script>

+ 62 - 1
src/packages/pc/views/query/trade/goods/history/index.vue

@@ -1,12 +1,73 @@
 <!-- 成交记录-商品合约-历史记录 -->
 <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 #buyorsell="{ value }">
+            {{ getBuyOrSellName(value) }}
+        </template>
+        <!-- 成交类型 -->
+        <template #buildtype="{ value }">
+            {{ getBuildTypeName(value) }}
+        </template>
+        <!-- 委托时间 -->
+        <template #tradetime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { useDataFilter } from '@/hooks/datatable'
+import { useRequest } from '@/hooks/request'
+import { queryHisTradeDetail } from '@/services/api/order'
+import { getBuildTypeName, getBuyOrSellName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 
+const { filterOptons, getQueryParams } = useDataFilter<Model.HisTradeDetailReq>()
+const filterDate = shallowRef<string[]>([])
+
+const { loading, dataList, run } = useRequest(queryHisTradeDetail, {
+    params: {
+        tradeMode: '50'
+    },
+})
+
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'goodsname', label: '订单合约' },
+    { prop: 'buyorsell', label: '类型' },
+    { prop: 'buildtype', label: '成交类型' },
+    { prop: 'tradeprice', label: '成交价' },
+    { prop: 'tradeqty', label: '成交数量' },
+    { prop: 'charge', label: '手续费' },
+    { prop: 'closepl', label: '平仓盈亏' },
+    { prop: 'tradeid', label: '成交单号' },
+    { prop: 'matchaccountid', label: '成交对手' },
+    { prop: 'tradetime', 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.startDate = filterDate.value[0]
+        qs.endDate = filterDate.value[1]
+        run(qs)
+    }, clear)
+}
 </script>

+ 34 - 1
src/packages/pc/views/query/trade/goods/list/index.vue

@@ -1,12 +1,45 @@
 <!-- 成交记录-商品合约-当前记录 -->
 <template>
-    <app-table :data="[]" v-model:columns="tableColumns" />
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+        <!-- 类型 -->
+        <template #buyorsell="{ value }">
+            {{ getBuyOrSellName(value) }}
+        </template>
+        <!-- 成交类型 -->
+        <template #buildtype="{ value }">
+            {{ getBuildTypeName(value) }}
+        </template>
+        <!-- 委托时间 -->
+        <template #tradetime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryTradeDetail } from '@/services/api/order'
+import { getBuildTypeName, getBuyOrSellName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 
+const { loading, dataList } = useRequest(queryTradeDetail, {
+    params: {
+        tradeMode: '50'
+    },
+})
+
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'goodsname', label: '订单合约' },
+    { prop: 'buyorsell', label: '类型' },
+    { prop: 'buildtype', label: '成交类型' },
+    { prop: 'tradeprice', label: '成交价' },
+    { prop: 'tradeqty', label: '成交数量' },
+    { prop: 'charge', label: '手续费' },
+    { prop: 'closepl', label: '平仓盈亏' },
+    { prop: 'tradeid', label: '成交单号' },
+    { prop: 'matchaccountid', label: '成交对手' },
+    { prop: 'tradetime', label: '成交时间' },
 ])
 </script>

+ 66 - 3
src/packages/pc/views/query/trade/spot/history/index.vue

@@ -1,12 +1,75 @@
-<!-- 成交记录-现货仓单-历史记录 -->
+<!-- 成交记录-现货仓单-当前记录 -->
 <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 #buyorsell="{ value }">
+            {{ getBuildTypeName(value) }}
+        </template>
+        <!-- 委托时间 -->
+        <template #ordertime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
+import { shallowRef, reactive } from 'vue'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { useDataFilter } from '@/hooks/datatable'
+import { queryWrTradeDetail } from '@/services/api/order'
+import { getBuildTypeName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter/index.vue'
+
+const { filterOptons, getQueryParams } = useDataFilter<Model.WrTradeDetailRsp>()
+const filterDate = shallowRef<string[]>([])
+
+const formData = reactive<Model.WrTradeDetailReq>({
+    marketid: 17201,
+    haswr: 1,
+})
+
+const { loading, dataList, run } = useRequest(queryWrTradeDetail, {
+    params: {
+        ...formData
+    },
+})
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'wrtradedetailid', label: '成交单号' },
+    { prop: 'buyorsell', label: '类型' },
+    { prop: 'deliverygoodsname', label: '品种' },
+    { prop: 'wrstandardname', label: '商品' },
+    { prop: 'warehousename', label: '仓库' },
+    { prop: 'tradeprice', label: '成交价格' },
+    { prop: 'tradeqty', label: '成交数量' },
+    { prop: 'chargevalue', label: '手续费' },
+    { prop: 'matchusername', label: '对手方' },
+    { prop: 'tradetime', 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>

+ 31 - 1
src/packages/pc/views/query/trade/spot/list/index.vue

@@ -1,12 +1,42 @@
 <!-- 成交记录-现货仓单-当前记录 -->
 <template>
-    <app-table :data="[]" v-model:columns="tableColumns" />
+    <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+        <!-- 挂牌方式 -->
+        <template #buyorsell="{ value }">
+            {{ getBuildTypeName(value) }}
+        </template>
+        <!-- 委托时间 -->
+        <template #ordertime="{ value }">
+            {{ formatDate(value) }}
+        </template>
+    </app-table>
 </template>
 
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryWrTradeDetail } from '@/services/api/order'
+import { getBuildTypeName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
 
+const { loading, dataList } = useRequest(queryWrTradeDetail, {
+    params: {
+        marketid: 17201,
+        haswr: 1 
+    },
+})
+
 const tableColumns = shallowRef<Model.TableColumn[]>([
+    { prop: 'wrtradedetailid', label: '成交单号' },
+    { prop: 'buyorsell', label: '类型' },
+    { prop: 'deliverygoodsname', label: '品种' },
+    { prop: 'wrstandardname', label: '商品' },
+    { prop: 'warehousename', label: '仓库' },
+    { prop: 'tradeprice', label: '成交价格' },
+    { prop: 'tradeqty', label: '成交数量' },
+    { prop: 'chargevalue', label: '手续费' },
+    { prop: 'matchusername', label: '对手方' },
+    { prop: 'tradetime', label: '成交时间' },
 ])
 </script>