浏览代码

提示类-色卡开放大区及以上级别权限

zhujindu 11 月之前
父节点
当前提交
54600accf2
共有 2 个文件被更改,包括 12 次插入12 次删除
  1. 9 9
      src/views/home/hintTabPage/hintDetail.vue
  2. 3 3
      src/views/home/hintTabPage/index.vue

+ 9 - 9
src/views/home/hintTabPage/hintDetail.vue

@@ -293,8 +293,8 @@ export default {
           name: 'createStore',
         },
       ];
-      // 2销售部主管和大区主管显示色卡
-      if (this.userInfo.empLevel == '2' || this.userInfo.empLevel == '1') {
+      // 业务员不显示色卡
+      if (this.userInfo.empLevel != '3') {
         this.tabsItem.push({
           title: '色卡',
           name: 'pantone',
@@ -310,8 +310,8 @@ export default {
       // 请求子级数据时不需要loading
       if (!resolve && !tree) {
         this.toggleIndex = this.toggleIndex++;
-        this.maskShow = true;
       }
+      this.maskShow = true;
       if (this.fromType == 'noVisit') {
         // 未拜访
         this.deptId = tree ? tree.onlyId : this.userInfo.deptId;
@@ -351,6 +351,7 @@ export default {
     // 未拜访
     selectNoVisitsInfoFun(resolve) {
       selectNoVisitsInfo({ deptId: this.deptId }).then((res) => {
+        this.maskShow = false;
         if (res.code == 200) {
           res.data.forEach((val) => {
             if (val.empLevel < 3) val.hasChildren = true;
@@ -359,11 +360,9 @@ export default {
           if (resolve) {
             resolve && resolve(res.data);
           } else {
-            this.maskShow = false;
             this.tableList = res.data;
           }
         } else {
-          this.maskShow = false;
           this.Toast({
             message: res.msg,
             duration: 5000,
@@ -374,6 +373,7 @@ export default {
     // 建店
     selectPendingCasesInfoFun(resolve) {
       selectPendingCasesInfo({ deptId: this.deptId }).then((res) => {
+        this.maskShow = false;
         if (res.code == 200) {
           res.data.forEach((val) => {
             // 是否还有子级
@@ -383,11 +383,9 @@ export default {
           if (resolve) {
             resolve && resolve(res.data);
           } else {
-            this.maskShow = false;
             this.tableList = res.data;
           }
         } else {
-          this.maskShow = false;
           this.Toast({
             message: res.msg,
             duration: 5000,
@@ -417,19 +415,21 @@ export default {
     getReportMaterialTypeFun(resolve, deptId) {
       // deptId 第一次传 null 获取当前等级下的数据(不需要当前层级)
       getReportMaterialType({ materialCode: this.materialCode, deptId: deptId }).then((res) => {
+        this.maskShow = false;
         if (res.code == 200) {
           res.data.colorCardList.forEach((val) => {
             if (val.isChildren && val.isChildren == 'true') val.hasChildren = true;
           });
           // 是否是子级
           if (resolve) {
+            res.data.colorCardList.forEach((val, index) => {
+              this.$set(val, 'warehouseCode', val.warehouseCode + index);
+            });
             resolve && resolve(res.data.colorCardList);
           } else {
-            this.maskShow = false;
             this.tableList = res.data.colorCardList;
           }
         } else {
-          this.maskShow = false;
           this.Toast({
             message: res.msg,
             duration: 5000,

+ 3 - 3
src/views/home/hintTabPage/index.vue

@@ -112,7 +112,7 @@
           </div>
         </van-collapse-item>
         <!-- 色卡 -->
-        <van-collapse-item name="4" v-if="empLevel != '4'">
+        <van-collapse-item name="4">
           <template #title>
             <div class="itemHeader" @click.stop>
               <span class="itemTitle">{{ pantone.title }}</span>
@@ -528,8 +528,8 @@ export default {
       // 业务员进入未拜访列表
       if (this.empLevel == '3') {
         this.$router.push({ path: '/pantoneNoGet', query: { storeId: val.storeId } });
-      } else if (this.empLevel != '4') {
-        // 销售部主管,大区,公司
+      } else {
+        // 销售部,大区,公司,总部
         this.$router.push({
           path: '/hintDetail',
           query: { fromType: 'pantone', materialCode: val.materialCode, pantoneName: key }, // materialCode物料来源