li.shaoyi 1 년 전
부모
커밋
36016c3efb

+ 13 - 2
src/packages/gcszt/App.vue

@@ -1,16 +1,25 @@
 <template>
   <router-view />
+  <Notify v-model:show="notify.show" :title="notify.title" :content="notify.content" />
 </template>
 
 <script lang="ts" setup>
+import { reactive } from 'vue'
 import { useNavigation } from '@mobile/router/navigation'
-import { dialog, notify } from '@/utils/vant'
+import { dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import eventBus from '@/services/bus'
+import Notify from '@mobile/components/base/notify/index.vue'
 
 const { userLogout } = useLogin()
 const { backHome } = useNavigation()
 
+const notify = reactive({
+  show: false,
+  title: '',
+  content: ''
+})
+
 // 接收用户登出通知
 eventBus.$on('LogoutNotify', (msg) => {
   userLogout(() => {
@@ -31,7 +40,9 @@ eventBus.$on('LogoutNotify', (msg) => {
 eventBus.$on('RiskToWebNtf', (msg, type) => {
   const res = msg as { title: string, content: string }
   if (type === 1) {
-    notify(res.content, 'warning')
+    notify.title = res.title
+    notify.content = res.content
+    notify.show = true
   } else {
     dialog({
       title: res.title,

+ 13 - 2
src/packages/gstj/App.vue

@@ -1,16 +1,25 @@
 <template>
   <router-view />
+  <Notify v-model:show="notify.show" :title="notify.title" :content="notify.content" />
 </template>
 
 <script lang="ts" setup>
+import { reactive } from 'vue'
 import { useNavigation } from '@mobile/router/navigation'
-import { dialog, notify } from '@/utils/vant'
+import { dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import eventBus from '@/services/bus'
+import Notify from '@mobile/components/base/notify/index.vue'
 
 const { userLogout } = useLogin()
 const { backHome } = useNavigation()
 
+const notify = reactive({
+  show: false,
+  title: '',
+  content: ''
+})
+
 // 接收用户登出通知
 eventBus.$on('LogoutNotify', (msg) => {
   userLogout(() => {
@@ -31,7 +40,9 @@ eventBus.$on('LogoutNotify', (msg) => {
 eventBus.$on('RiskToWebNtf', (msg, type) => {
   const res = msg as { title: string, content: string }
   if (type === 1) {
-    notify(res.content, 'warning')
+    notify.title = res.title
+    notify.content = res.content
+    notify.show = true
   } else {
     dialog({
       title: res.title,

+ 2 - 2
src/packages/mobile/assets/themes/base/iconfont.less

@@ -150,8 +150,8 @@
         }
     }
 
-    /* 取消订单 */
-    &-order-cancel {
+    /* 终止订单 */
+    &-order-close {
         &--line:before {
             content: '\e9e9';
         }

+ 2 - 2
src/packages/pc/components/modules/hqchart/timeline/index.vue

@@ -5,7 +5,7 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { Chart } from 'hqchart'
-import { changeUnit, handleNumberValue } from '@/filters'
+import { handleNumberValue } from '@/filters'
 import { useFuturesStore } from '@/stores'
 import { useDataset } from '@/hooks/hqchart/timeline/dataset'
 import { MinuteChartContainer, NetworkFilterData, NetworkFilterCallback } from '@/hooks/hqchart/timeline/types'
@@ -63,7 +63,7 @@ const chartOption = {
             const { FormatDateTimeString } = Chart.IFrameSplitOperator
             // 自定义标题栏,参考源码 DynamicMinuteTitlePainting.GetFormatTitle
             paint.GetFormatTitle = (data) => {
-                const { DateTime, Open, Close, Vol, Amount, YClose, Increase } = data.Data
+                const { DateTime, Open, Close, YClose, Increase } = data.Data
                 const AryText = [
                     { Text: FormatDateTimeString(DateTime, paint.IsShowDate, paint.IsShowTime), Color: paint.DateTimeColor },
                     { Text: '价:' + handleNumberValue(Close), Color: paint.GetColor(Open, YClose) },

+ 13 - 2
src/packages/qdhs/App.vue

@@ -1,16 +1,25 @@
 <template>
   <router-view />
+  <Notify v-model:show="notify.show" :title="notify.title" :content="notify.content" />
 </template>
 
 <script lang="ts" setup>
+import { reactive } from 'vue'
 import { useNavigation } from '@mobile/router/navigation'
-import { dialog, notify } from '@/utils/vant'
+import { dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import eventBus from '@/services/bus'
+import Notify from '@mobile/components/base/notify/index.vue'
 
 const { userLogout } = useLogin()
 const { backHome } = useNavigation()
 
+const notify = reactive({
+  show: false,
+  title: '',
+  content: ''
+})
+
 // 接收用户登出通知
 eventBus.$on('LogoutNotify', (msg) => {
   userLogout(() => {
@@ -31,7 +40,9 @@ eventBus.$on('LogoutNotify', (msg) => {
 eventBus.$on('RiskToWebNtf', (msg, type) => {
   const res = msg as { title: string, content: string }
   if (type === 1) {
-    notify(res.content, 'warning')
+    notify.title = res.title
+    notify.content = res.content
+    notify.show = true
   } else {
     dialog({
       title: res.title,

+ 13 - 2
src/packages/qxst/App.vue

@@ -1,16 +1,25 @@
 <template>
   <router-view />
+  <Notify v-model:show="notify.show" :title="notify.title" :content="notify.content" />
 </template>
 
 <script lang="ts" setup>
+import { reactive } from 'vue'
 import { useNavigation } from '@mobile/router/navigation'
-import { dialog, notify } from '@/utils/vant'
+import { dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import eventBus from '@/services/bus'
+import Notify from '@mobile/components/base/notify/index.vue'
 
 const { userLogout } = useLogin()
 const { backHome } = useNavigation()
 
+const notify = reactive({
+  show: false,
+  title: '',
+  content: ''
+})
+
 // 接收用户登出通知
 eventBus.$on('LogoutNotify', (msg) => {
   userLogout(() => {
@@ -31,7 +40,9 @@ eventBus.$on('LogoutNotify', (msg) => {
 eventBus.$on('RiskToWebNtf', (msg, type) => {
   const res = msg as { title: string, content: string }
   if (type === 1) {
-    notify(res.content, 'warning')
+    notify.title = res.title
+    notify.content = res.content
+    notify.show = true
   } else {
     dialog({
       title: res.title,

+ 13 - 2
src/packages/sbyj/App.vue

@@ -1,16 +1,25 @@
 <template>
   <router-view />
+  <Notify v-model:show="notify.show" :title="notify.title" :content="notify.content" />
 </template>
 
 <script lang="ts" setup>
+import { reactive } from 'vue'
 import { useNavigation } from '@mobile/router/navigation'
-import { dialog, notify } from '@/utils/vant'
+import { dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import eventBus from '@/services/bus'
+import Notify from '@mobile/components/base/notify/index.vue'
 
 const { userLogout } = useLogin()
 const { backHome } = useNavigation()
 
+const notify = reactive({
+  show: false,
+  title: '',
+  content: ''
+})
+
 // 接收用户登出通知
 eventBus.$on('LogoutNotify', (msg) => {
   userLogout(() => {
@@ -31,7 +40,9 @@ eventBus.$on('LogoutNotify', (msg) => {
 eventBus.$on('RiskToWebNtf', (msg, type) => {
   const res = msg as { title: string, content: string }
   if (type === 1) {
-    notify(res.content, 'warning')
+    notify.title = res.title
+    notify.content = res.content
+    notify.show = true
   } else {
     dialog({
       title: res.title,

+ 3 - 7
src/packages/sbyj/router/index.ts

@@ -196,13 +196,9 @@ const routes: Array<RouteRecordRaw> = [
         component: () => import('../views/order/history/index.vue'),
       },
       {
-        path: 'cancel',
-        name: 'cancel-list',
-        component: () => import('../views/order/history/index.vue'),
-        props: {
-          title: '终止订单',
-          holderqty: 0
-        }
+        path: 'close',
+        name: 'close-list',
+        component: () => import('../views/order/close/index.vue'),
       }
     ]
   },

+ 2 - 2
src/packages/sbyj/views/mine/index.vue

@@ -70,8 +70,8 @@
                 <li @click="routerTo('order-list')">
                     <Iconfont label-direction="bottom" icon="g-icon-order--line">持有订单</Iconfont>
                 </li>
-                <li @click="routerTo('cancel-list')">
-                    <Iconfont label-direction="bottom" icon="g-icon-order-cancel--line">终止订单</Iconfont>
+                <li @click="routerTo('close-list')">
+                    <Iconfont label-direction="bottom" icon="g-icon-order-close--line">终止订单</Iconfont>
                 </li>
                 <li @click="routerTo('delivery-list')">
                     <Iconfont label-direction="bottom" icon="g-icon-delivery--line">交料订单</Iconfont>

+ 77 - 0
src/packages/sbyj/views/order/close/index.vue

@@ -0,0 +1,77 @@
+<template>
+    <app-view>
+        <template #header>
+            <app-navbar title="终止订单" />
+        </template>
+        <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
+            :page-count="pageCount" @refresh="run">
+            <div class="g-order-list">
+                <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
+                    <div class="g-order-list__titlebar">
+                        <div class="left">
+                            <h4 :class="item.buyorsell === BuyOrSell.Buy ? 'g-price-up' : 'g-price-down'">
+                                {{ item.buyorsell === BuyOrSell.Buy ? '买料:' : '卖料:' }}
+                                {{ item.goodsfullname }}
+                            </h4>
+                            <span>{{ item.opentradeid }}</span>
+                        </div>
+                        <div class="right">
+                            <span>{{ formatDate(item.closetime) }}</span>
+                        </div>
+                    </div>
+                    <div class="g-order-list__content">
+                        <ul>
+                            <li>
+                                <span>订单重量</span>
+                                <span>{{ item.opennum }}</span>
+                            </li>
+                            <li>
+                                <span>订单价格</span>
+                                <span>{{ formatDecimal(item.openprice) }}</span>
+                            </li>
+                            <li>
+                                <span>终止重量</span>
+                                <span>{{ item.closenum }}</span>
+                            </li>
+                            <li>
+                                <span>终止价格</span>
+                                <span>{{ formatDecimal(item.closeprice) }}</span>
+                            </li>
+                            <li>
+                                <span>终止余额</span>
+                                <span>{{ formatDecimal(item.closepl) }}</span>
+                            </li>
+                        </ul>
+                    </div>
+                </div>
+            </div>
+        </app-pull-refresh>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef } from 'vue'
+import { formatDecimal,formatDate } from '@/filters'
+import { BuyOrSell } from '@/constants/order'
+import { useRequest } from '@/hooks/request'
+import { queryTradeCloseDetails } from '@/services/api/order'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+
+const error = shallowRef(false)
+const dataList = shallowRef<Model.TradeCloseDetailsRsp[]>([])
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryTradeCloseDetails, {
+    params: {
+        pagesize: 20,
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+</script>

+ 2 - 11
src/packages/sbyj/views/order/history/index.vue

@@ -1,7 +1,7 @@
 <template>
     <app-view>
         <template #header>
-            <app-navbar :title="title" />
+            <app-navbar title="全部订单" />
         </template>
         <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
             :page-count="pageCount" @refresh="run">
@@ -71,14 +71,6 @@ import { useRequest } from '@/hooks/request'
 import { queryTradeHolderDetailEx } from '@/services/api/order'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 
-const props = defineProps({
-    title: {
-        type: String,
-        default: '全部订单'
-    },
-    holderqty: Number
-})
-
 const error = shallowRef(false)
 const dataList = shallowRef<Model.TradeHolderDetailExRsp[]>([])
 
@@ -89,8 +81,7 @@ const enableqty = (item: Model.TradeHolderDetailExRsp) => {
 
 const { loading, pageIndex, pageCount, run } = useRequest(queryTradeHolderDetailEx, {
     params: {
-        pagesize: 20,
-        holderqty: props.holderqty
+        pagesize: 20
     },
     onSuccess: (res) => {
         if (pageIndex.value === 1) {

+ 13 - 2
src/packages/tc/App.vue

@@ -1,16 +1,25 @@
 <template>
   <router-view />
+  <Notify v-model:show="notify.show" :title="notify.title" :content="notify.content" />
 </template>
 
 <script lang="ts" setup>
+import { reactive } from 'vue'
 import { useNavigation } from '@mobile/router/navigation'
-import { dialog, notify } from '@/utils/vant'
+import { dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import eventBus from '@/services/bus'
+import Notify from '@mobile/components/base/notify/index.vue'
 
 const { userLogout } = useLogin()
 const { backHome } = useNavigation()
 
+const notify = reactive({
+  show: false,
+  title: '',
+  content: ''
+})
+
 // 接收用户登出通知
 eventBus.$on('LogoutNotify', (msg) => {
   userLogout(() => {
@@ -31,7 +40,9 @@ eventBus.$on('LogoutNotify', (msg) => {
 eventBus.$on('RiskToWebNtf', (msg, type) => {
   const res = msg as { title: string, content: string }
   if (type === 1) {
-    notify(res.content, 'warning')
+    notify.title = res.title
+    notify.content = res.content
+    notify.show = true
   } else {
     dialog({
       title: res.title,

+ 13 - 2
src/packages/tjmd/App.vue

@@ -1,16 +1,25 @@
 <template>
   <router-view />
+  <Notify v-model:show="notify.show" :title="notify.title" :content="notify.content" />
 </template>
 
 <script lang="ts" setup>
+import { reactive } from 'vue'
 import { useNavigation } from '@mobile/router/navigation'
-import { dialog, notify } from '@/utils/vant'
+import { dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import eventBus from '@/services/bus'
+import Notify from '@mobile/components/base/notify/index.vue'
 
 const { userLogout } = useLogin()
 const { backHome } = useNavigation()
 
+const notify = reactive({
+  show: false,
+  title: '',
+  content: ''
+})
+
 // 接收用户登出通知
 eventBus.$on('LogoutNotify', (msg) => {
   userLogout(() => {
@@ -31,7 +40,9 @@ eventBus.$on('LogoutNotify', (msg) => {
 eventBus.$on('RiskToWebNtf', (msg, type) => {
   const res = msg as { title: string, content: string }
   if (type === 1) {
-    notify(res.content, 'warning')
+    notify.title = res.title
+    notify.content = res.content
+    notify.show = true
   } else {
     dialog({
       title: res.title,

+ 13 - 2
src/packages/zrwyt/App.vue

@@ -1,16 +1,25 @@
 <template>
   <router-view />
+  <Notify v-model:show="notify.show" :title="notify.title" :content="notify.content" />
 </template>
 
 <script lang="ts" setup>
+import { reactive } from 'vue'
 import { useNavigation } from '@mobile/router/navigation'
-import { dialog, notify } from '@/utils/vant'
+import { dialog } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import eventBus from '@/services/bus'
+import Notify from '@mobile/components/base/notify/index.vue'
 
 const { userLogout } = useLogin()
 const { backHome } = useNavigation()
 
+const notify = reactive({
+  show: false,
+  title: '',
+  content: ''
+})
+
 // 接收用户登出通知
 eventBus.$on('LogoutNotify', (msg) => {
   userLogout(() => {
@@ -31,7 +40,9 @@ eventBus.$on('LogoutNotify', (msg) => {
 eventBus.$on('RiskToWebNtf', (msg, type) => {
   const res = msg as { title: string, content: string }
   if (type === 1) {
-    notify(res.content, 'warning')
+    notify.title = res.title
+    notify.content = res.content
+    notify.show = true
   } else {
     dialog({
       title: res.title,

+ 15 - 0
src/services/api/order/index.ts

@@ -261,4 +261,19 @@ export function queryMyDeliveryOfflineOperateLogs(config: RequestConfig<Model.My
             ...config.data
         },
     })
+}
+
+/**
+ * 查询我的终止订单
+ * @param config 
+ * @returns 
+ */
+export function queryTradeCloseDetails(config: RequestConfig<Model.TradeCloseDetailsReq> = {}) {
+    return http.commonRequest<Model.TradeCloseDetailsRsp[]>({
+        url: '/sbyj/QueryTradeCloseDetails',
+        params: {
+            accountid: getAccountId(),
+            ...config.data
+        },
+    })
 }

+ 36 - 0
src/types/model/order.d.ts

@@ -1792,4 +1792,40 @@ declare namespace Model {
         tradetime: string; // 交易时间
         userid: number; // 用户ID
     }
+
+    /** 查询我的终止订单 请求 */
+    interface TradeCloseDetailsReq {
+        accountid?: number; // 资金账户
+        page?: number; // 页码
+        pagesize?: number; // 每页条数
+    }
+
+    /** 查询我的终止订单 响应 */
+    interface TradeCloseDetailsRsp {
+        accountid: number; // 账号ID
+        buyorsell: number; // 方向 - 0:买 1:卖
+        closeid: number; // 平仓明细ID(104+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
+        closenum: string; // 平仓数量(带单位)
+        closepl: number; // 平仓盈亏 - 按持仓价计算
+        closeprice: number; // 平仓价格
+        closeqty: number; // 平仓数量
+        closetime: string; // 平仓时间
+        goodsfullname: string; // 商品名称
+        goodsid: number; // 商品ID
+        holderprice: number; // 持仓价格
+        isconfirmexercise: number; // 是否确认行权- 0:否 1:是
+        ispreexercise: number; // 是否预申报- 0:否 1:是
+        marketid: number; // 市场ID
+        opennum: string; // 开仓数量(带单位)
+        openprice: number; // 建仓价格
+        opentradedate: string; // 建仓成交单交易日
+        opentradeid: number; // 关联建仓成交单号
+        optiontype: number; // 期权类型 - 1:认购(看涨) 2:认沽(看跌)
+        preexerciseprice: number; // 预申报价格
+        premium: number; // 权利金 - [持仓单的权利金]
+        releasecredit: number; // 释放授信金额
+        tradedate: string; // 交易日(yyyyMMdd)
+        tradeid: number; // 成交单号
+        tradeproperty: number; // 交易属性
+    }
 }