huangbin 4 лет назад
Родитель
Сommit
1b72124eeb

+ 19 - 9
src/views/information/account_info/list/account_info_trade/index.vue

@@ -9,7 +9,7 @@
              aria-hidden="true">
           <use xlink:href="#icon-shuzhuangtu"></use>
         </svg>
-        多元世纪信息技术有限公司(6)
+        {{getUserName()}}
       </span>
     </div>
     <a-collapse class="spotCollapse"
@@ -29,18 +29,26 @@
       <a-collapse-panel>
         <template #header>
           <a-row class="headRow">
-            <a-col :span="12">业务员(2)</a-col>
+            <a-col :span="12">跟单员(3)</a-col>
             <a-col :span="12">
               <BtnList :btnList="commonBtn" />
             </a-col>
           </a-row>
         </template>
-        <a-row class="contRow"
-               v-for="(item, i) in traderList"
-               :key="i + '11'">
-          <a-col :span="12">{{item.rolename}}</a-col>
-          <a-col :span="12">{{getAccountStatus(item.accountstatus)}}</a-col>
-        </a-row>
+        <a-collapse class="spotCollapse"
+                    v-for="(item, i) in traderList"
+                    :key="i + '11'"
+                    :bordered="false">
+          <a-collapse-panel :show-arrow="false">
+            <template #header>
+              <a-row class="headRow">
+                <a-col :span="12">{{item.rolename}}</a-col>
+                <a-col :span="12">{{getAccountStatus(item.accountstatus)}}</a-col>
+              </a-row>
+            </template>
+            <BtnList :btnList="forDataBtn" />
+          </a-collapse-panel>
+        </a-collapse>
       </a-collapse-panel>
     </a-collapse>
   </div>
@@ -51,6 +59,7 @@ import { defineComponent, initData, getBtnList, contextMenu, BtnList } from '@/c
 import filterCustomTable from '@/views/information/goods/components/filterTable/index.vue';
 import { ref } from 'vue';
 import { handleAccountManager, getAccountStatus } from '../setup';
+import { getUserName } from '@/services/bus/user';
 
 export default defineComponent({
     name: 'account_info_trade',
@@ -63,7 +72,7 @@ export default defineComponent({
         const { traderList, getRoleList } = handleAccountManager();
         console.log('traderList', traderList);
 
-        const { commonBtn, forDataBtn } = getBtnList('account_info_business', true);
+        const { commonBtn, forDataBtn } = getBtnList('account_info_trade', true);
         const loading = ref<boolean>(false);
         initData(() => {
             getRoleList();
@@ -79,6 +88,7 @@ export default defineComponent({
             search,
             traderList,
             getAccountStatus,
+            getUserName,
         };
     },
 });

+ 25 - 19
src/views/information/account_info/list/setup.ts

@@ -113,23 +113,29 @@ export function getLoginStatus(type: number): string {
  * @returns 
  */
 export function getAccountStatus(type: number) {
-    console.log('getItemEnum', getItemEnum('accountstatus'));
-
-    const temp = getItemEnum('accountstatus').find(e => e.enumitemname === type)
-    return temp ? temp.enumdicname : '--'
+    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
 }
-// export function getLoginStatus(type: number) {
-//     let result = '--'
-//     switch(type) {
-//         case 1:
-//         result = '正常'
-//         break;
-//         case 2:
-//         result = '冻结'
-//         break;
-//         case 3:
-//         result = '无效'
-//         break;
-//     }
-//     return result
-// }