li.shaoyi 2 年之前
父節點
當前提交
7a68a58d14

+ 17 - 0
src/constants/order.ts

@@ -120,4 +120,21 @@ export function getStepStatusList() {
 export function getStepStatusName(value: number) {
     const enums = getStepStatusList()
     return getEnumTypeName(enums, value)
+}
+
+/**
+ * 获取委托状态列表
+ * @returns 
+ */
+export function getWRTradeOrderStatusList() {
+    return getEnumTypeList('WRTradeOrderStatus')
+}
+
+/**
+ * 获取委托状态名称
+ * @returns 
+ */
+export function getWRTradeOrderStatusName(value: number) {
+    const enums = getWRTradeOrderStatusList()
+    return getEnumTypeName(enums, value)
 }

+ 1 - 1
src/filters/index.ts

@@ -74,7 +74,7 @@ export function handleNumberValue(value?: number | string, suffix = '') {
  * @param value 
  * @param decimal 保留小数位
  */
-export function parsePercent(value: number, decimal = 2) {
+export function parsePercent(value = 0, decimal = 2) {
     const val = formatDecimal((value * 100).toPrecision(12), decimal, false)
     return handleNumberValue(val, '%')
 }

+ 2 - 2
src/packages/pc/views/trade/sale/components/details/index.vue

@@ -29,7 +29,7 @@
                         </li>
                         <li>
                             <span>委托状态</span>
-                            <span>{{ selectedRow.wrtradeorderstatus }}</span>
+                            <span>{{ getWRTradeOrderStatusName(selectedRow.wrtradeorderstatus) }}</span>
                         </li>
                         <li>
                             <span>商品编号</span>
@@ -91,7 +91,7 @@ export default defineComponent({
 <script lang="ts" setup>
 import { PropType, shallowRef } from 'vue'
 import { formatDecimal } from '@/filters'
-import { getApplyStatusName } from '@/constants/order'
+import { getApplyStatusName, getWRTradeOrderStatusName } from '@/constants/order'
 import { useLoginStore, usePerformanceStore } from '@/stores'
 import { queryMyBargainApply } from '@/services/api/trade'
 import AppTable from '@pc/components/base/table/index.vue'

+ 2 - 2
src/services/http/index.ts

@@ -35,7 +35,7 @@ export default new (class {
             },
             (err) => {
                 console.error(err)
-                return Promise.reject('出现错误,请稍后再试')
+                return Promise.reject('发生错误,请稍后再试')
             }
         )
 
@@ -60,7 +60,7 @@ export default new (class {
                         }
                     }
                 }
-                return Promise.reject('出现错误,请稍后再试')
+                return Promise.reject('发生错误,请稍后再试')
             }
         )
     }

+ 1 - 1
src/stores/modules/enum.ts

@@ -12,7 +12,7 @@ export interface EnumType {
     disabled?: boolean;
 }
 
-const enumKeys = ['ZSCategory', 'ZSCurrencyType', 'ZSCurrencyType', 'ZSColorType', 'ZSClarityType', 'ZSCutType', 'ZSShapeType', 'ZSSymmetryType', 'ZSPolishType', 'ZSFluorescenceType', 'ZSCertType', 'ZSCrystalType', 'ZSCZColor1Type', 'ZSCZColor2Type', 'ZSCZColor3Type', 'ZSStyleType', 'signstatus', 'applystatus', 'executetype', 'certificatetype', 'clientType', 'wrApplyStatus', 'performanceStatus', 'stepStatus', 'GZCJAccountType', 'GZCJCategoryType', 'GZCJDeliveryType', 'GZCJShapeType', 'GZCJMarkType', 'GZCJPublishType', 'GZCJServiceType', 'GZCJStatus', 'GZBSStatus', 'GZBSDeliveryType', 'GZBSCOrderType', 'GZBSCOrderStatus', 'GZBSCOutType', 'GZBSCPayStatus', 'GZBSCPayMode', 'YSZSCategory', 'YSProductionMode', 'WRPresaleStatus', 'inoutapplystatus'] as const
+const enumKeys = ['ZSCategory', 'ZSCurrencyType', 'ZSCurrencyType', 'ZSColorType', 'ZSClarityType', 'ZSCutType', 'ZSShapeType', 'ZSSymmetryType', 'ZSPolishType', 'ZSFluorescenceType', 'ZSCertType', 'ZSCrystalType', 'ZSCZColor1Type', 'ZSCZColor2Type', 'ZSCZColor3Type', 'ZSStyleType', 'signstatus', 'applystatus', 'executetype', 'certificatetype', 'clientType', 'wrApplyStatus', 'performanceStatus', 'stepStatus', 'GZCJAccountType', 'GZCJCategoryType', 'GZCJDeliveryType', 'GZCJShapeType', 'GZCJMarkType', 'GZCJPublishType', 'GZCJServiceType', 'GZCJStatus', 'GZBSStatus', 'GZBSDeliveryType', 'GZBSCOrderType', 'GZBSCOrderStatus', 'GZBSCOutType', 'GZBSCPayStatus', 'GZBSCPayMode', 'YSZSCategory', 'YSProductionMode', 'WRPresaleStatus', 'inoutapplystatus', 'WRTradeOrderStatus'] as const
 
 const enumMap = new Map<typeof enumKeys[number], ShallowRef<Ermcp.EnumRsp[]>>()
 

+ 1 - 1
src/stores/modules/futures.ts

@@ -196,7 +196,7 @@ export const useFuturesStore = defineStore(() => {
                 })
             }
         })
-    }, 200)
+    }, 100)
 
     // 接收行情推送通知
     const quotePushNotify = eventBus.$on('QuotePushNotify', (res) => {