Browse Source

commit 修改期货账户的状态枚举

yu jie 4 years ago
parent
commit
df93098c63

+ 3 - 3
src/views/information/account_info/list/account_info_futures/index.vue

@@ -48,7 +48,7 @@
             <template #header>
             <template #header>
               <a-row class="contRow">
               <a-row class="contRow">
                 <a-col :span="12">{{sub.accountname}}</a-col>
                 <a-col :span="12">{{sub.accountname}}</a-col>
-                <a-col :span="12">{{getAccountStatus(sub.tradestatus)}}</a-col>
+                <a-col :span="12">{{getTaAccountStatus(sub.tradestatus)}}</a-col>
               </a-row>
               </a-row>
             </template>
             </template>
             <BtnList :btnList="getBtnList(sub.tradestatus)"
             <BtnList :btnList="getBtnList(sub.tradestatus)"
@@ -92,7 +92,7 @@
 <script lang="ts">
 <script lang="ts">
 import { defineComponent, initData, _getBtnList, contextMenu, BtnList } from '@/common/export/table';
 import { defineComponent, initData, _getBtnList, contextMenu, BtnList } from '@/common/export/table';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
-import { getAccountStatus, handleModalData } from '../setup';
+import {getAccountStatus, getTaAccountStatus, handleModalData} from '../setup';
 import { handleTradeTemplate, queryTableList } from './setup';
 import { handleTradeTemplate, queryTableList } from './setup';
 import { getUserName } from '@/services/bus/user';
 import { getUserName } from '@/services/bus/user';
 import Add from '../../compoments/add-futures/index.vue';
 import Add from '../../compoments/add-futures/index.vue';
@@ -161,7 +161,7 @@ export default defineComponent({
             loading,
             loading,
             search,
             search,
             tableList,
             tableList,
-            getAccountStatus,
+            getTaAccountStatus,
             getUserName,
             getUserName,
             queryTable,
             queryTable,
             getBtnList,
             getBtnList,

+ 33 - 0
src/views/information/account_info/list/setup.ts

@@ -36,6 +36,39 @@ export function getAccountStatus(type: number) {
 }
 }
 
 
 /**
 /**
+ * 获取期货账户状态
+ * @param type
+ * @returns
+ */
+export function getTaAccountStatus(type: number) {
+    let result = '--'
+    switch (type) {
+        case 1:
+            result = '正常'
+            break;
+        case 2:
+            result = '受限'
+            break;
+        case 3:
+            result = '冻结(停用)'
+            break;
+        case 4:
+            result = '禁止建仓(人工受限)'
+            break;
+        case 5:
+            result = '禁止交易人(人工冻结)'
+            break;
+        case 6:
+            result = '待激活'
+            break;
+        case 7:
+            result = '已删除(注销)'
+            break;
+    }
+    return result
+}
+
+/**
  * 获取角色状态
  * 获取角色状态
  * @param type 
  * @param type 
  * @returns 
  * @returns