浏览代码

fix - 代理商上级销售/上级代理回显错误

jinyw 1 月之前
父节点
当前提交
bbb84b92a7

+ 2 - 1
RuoYi-Vue-fast-master/src/main/java/com/ruoyi/project/business/service/impl/TbAgentServiceImpl.java

@@ -310,7 +310,8 @@ public class TbAgentServiceImpl extends ServiceImpl<TbAgentMapper, TbAgent> impl
         agent.setAreaId(areaId);
         //agent.setParentAgentId(0L);
         agent.setAgentType("1");
-        agent.setPermissionChar(SecurityUtils.getPermissionCharIns());
+        // 查看所属区域的一级代理商不需要权限
+        agent.setPermissionChar("0");
         List<TbAgent> tbAgents = tbAgentMapper.selectTbAgentList(agent);
         // 排除自己
         tbAgents.removeIf(item -> item.getAgentId().equals(agentId));

+ 3 - 2
ruoyi-ui-vue2/src/views/user/agent/index.vue

@@ -711,6 +711,7 @@ export default {
         if (type === '1') {
           await this.getSalesByAreaId(areaId);
         } else if (type === '2') {
+          await this.getSalesByAreaId(areaId);
           await this.getAgentByAreaId(areaId);
         }
       }
@@ -924,13 +925,13 @@ export default {
         const agentId = row.agentId || this.ids
         await this.getAreaTree();
         const response = await getAgent(agentId);
+        this.form = response.data;
         // 根据区域id查询国家
-        // console.log('response:', response)
+        console.log('response:', response)
         await Promise.all([
           this.getCountryByAreaId(response.data.areaId),
           this.handleQueryByType(response.data.agentType, response.data.areaId)
         ]);
-        this.form = response.data;
         this.open = true;
         this.title = this.$t('agent.editAgent');
       } finally {