huangbin %!s(int64=4) %!d(string=hai) anos
pai
achega
71a9d34acf

+ 27 - 1
src/services/go/adress/index.ts

@@ -44,5 +44,31 @@ export function getAddress() {
             districtList.value = district.filter(e => e.parentcode === temp.divisioncode)
         }
     }
-    return { cityList, districtList, provinceList, getCityList, getDistrictList }
+    function getName(arr: Addresss[], autoid: number): string {
+        const temp = arr.find(e => e.autoid === autoid)
+        return temp ? temp.divisionname : '--'
+    }
+    /**
+     * 获取 省 名
+     * @param autoid 
+     */
+    function getProvinceName(autoid: number) {
+        return getName(cityList.value, autoid)
+    }
+    /**
+     * 获取 市 名
+     * @param autoid 
+     */
+    function getCityName(autoid: number) {
+        return getName(city, autoid)
+    }
+    /**
+     * 获取 区 名
+     * @param autoid 
+     */
+    function getDistrictName(autoid: number) {
+        return getName(district, autoid)
+    }
+
+    return { cityList, districtList, provinceList, getCityList, getDistrictList, getProvinceName, getCityName, getDistrictName }
 }

+ 7 - 47
src/views/information/account_info/list/account_info_trade/index.vue

@@ -35,51 +35,12 @@
             </a-col>
           </a-row>
         </template>
-        <a-row class="contRow"
-               v-for="(item, i) in businesserList"
+        <!-- <a-row class="contRow"
+               v-for="(item, i) in traderList"
                :key="i + '11'">
           <a-col :span="12">{{item.accountname}}-{{item.logincode}}</a-col>
           <a-col :span="12">{{getLoginStatus(item.loginstatus)}}</a-col>
-        </a-row>
-      </a-collapse-panel>
-    </a-collapse>
-    <a-collapse class="spotCollapse"
-                :bordered="false">
-      <template #expandIcon="props">
-        <svg class="icon svg-icon"
-             aria-hidden="true"
-             v-if="props.isActive == 0">
-          <use xlink:href="#icon-shouqi1"></use>
-        </svg>
-        <svg class="icon svg-icon"
-             aria-hidden="true"
-             v-else>
-          <use xlink:href="#icon-shouqi2"></use>
-        </svg>
-      </template>
-      <a-collapse-panel>
-        <template #header>
-          <a-row class="headRow">
-            <a-col :span="12">跟单员(3)</a-col>
-            <a-col :span="12">
-              <BtnList :btnList="commonBtn" />
-            </a-col>
-          </a-row>
-        </template>
-        <a-collapse class="spotCollapse"
-                    v-for="(item, i) in merchandiserList"
-                    :key="i + '11'"
-                    :bordered="false">
-          <a-collapse-panel :show-arrow="false">
-            <template #header>
-              <a-row class="headRow">
-                <a-col :span="12">{{item.accountname}}-{{item.logincode}}</a-col>
-                <a-col :span="12">{{getLoginStatus(item.loginstatus)}}</a-col>
-              </a-row>
-            </template>
-            <BtnList :btnList="forDataBtn" />
-          </a-collapse-panel>
-        </a-collapse>
+        </a-row> -->
       </a-collapse-panel>
     </a-collapse>
   </div>
@@ -99,12 +60,13 @@ export default defineComponent({
         filterCustomTable,
     },
     setup() {
-        const { businesserList, merchandiserList, getBusinesserList } = handleAccountManager();
+        const { traderList, getRoleList } = handleAccountManager();
+        console.log('traderList', traderList);
 
         const { commonBtn, forDataBtn } = getBtnList('account_info_business', true);
         const loading = ref<boolean>(false);
         initData(() => {
-            getBusinesserList();
+            getRoleList();
         });
 
         // 查询
@@ -115,9 +77,7 @@ export default defineComponent({
             forDataBtn,
             loading,
             search,
-            businesserList,
-            merchandiserList,
-            getLoginStatus,
+            traderList,
         };
     },
 });

+ 0 - 4
src/views/information/account_info/list/interface.ts

@@ -1,4 +0,0 @@
-export interface Value {
-    id: number,
-    name: string,
-}

+ 8 - 8
src/views/information/account_info/list/setup.ts

@@ -1,11 +1,10 @@
 import { Column, ColumnType } from '@/common/setup/table/index';
 import { getItemEnum } from '@/services/bus/allEnum';
 import { QueryAccMgrLoginUser } from '@/services/go/ermcp/account';
-import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { message } from 'ant-design-vue';
 import { ref } from 'vue';
-import { Value } from './interface';
 
 /**
  * 处理 /账号列表: 交易用户 业务员 跟单员
@@ -13,19 +12,20 @@ import { Value } from './interface';
  */
 export function handleAccountManager() {
     // 交易用户
-    const traderList = ref<Value[]>([])
+    const traderList = ref<ErmcpLoginUserEx[]>([])
     function getRoleList() {
         QueryAccMgrLoginUser(2).then(res => {
             const set = new Set<number>([])
             traderList.value.length = 0;
             res.forEach(e => {
                 const { roleid, rolename, accountstatus } = e;
-                if (accountstatus === 4) {  // 账户的状态 - 4 正常
-                    if (!set.has(roleid)) { // 去重
-                        set.add(roleid)
-                        traderList.value.push({ id: roleid, name: rolename })
-                    }
+                // if (accountstatus === 4) {  // 账户的状态 - 4 正常
+                if (!set.has(roleid)) { // 去重
+                    set.add(roleid)
+                    // traderList.value.push({ id: roleid, name: rolename })
+                    traderList.value.push(e)
                 }
+                // }
             })
         }).catch(err => message.error(err))
     }