فهرست منبع

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

zhujindu 11 ماه پیش
والد
کامیت
f3a77fa2c8
2فایلهای تغییر یافته به همراه17 افزوده شده و 17 حذف شده
  1. 10 10
      src/views/home/hintTabPage/hintDetail.vue
  2. 7 7
      src/views/home/hintTabPage/index.vue

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

@@ -289,8 +289,8 @@ export default {
           name: 'createStore',
         },
       ];
-      // 2销售部主管显示色卡
-      if (this.userInfo.empLevel == '2') {
+      // 2销售部主管和大区主管显示色卡
+      if (this.userInfo.empLevel == '2' || this.userInfo.empLevel == '1') {
         this.tabsItem.push({
           title: '色卡',
           name: 'pantone',
@@ -321,8 +321,8 @@ export default {
       } else if (this.fromType == 'pantone') {
         // 色卡
         this.firstProp = 'warehouseName';
-        let empLevel = tree ? tree.empLevel : null;
-        this.getPantoneData(resolve, empLevel);
+        let deptId = tree ? tree.onlyId : null;
+        this.getPantoneData(resolve, deptId);
       }
     },
     tabChange(val) {
@@ -372,6 +372,7 @@ export default {
       selectPendingCasesInfo({ deptId: this.deptId }).then((res) => {
         if (res.code == 200) {
           res.data.forEach((val) => {
+            // 是否还有子级
             if (val.empLevel < 3) val.hasChildren = true;
           });
           // 是否是子级
@@ -391,10 +392,9 @@ export default {
       });
     },
     // 色卡tab
-    getPantoneData(resolve, empLevel) {
+    getPantoneData(resolve, deptId) {
       if (JSON.stringify(this.tabsItemPantone) != '{}') {
-        // this.tabsItemPantone != {} 不是初次获取tab数据不需要在赋值
-        this.getReportMaterialTypeFun(resolve, empLevel);
+        this.getReportMaterialTypeFun(resolve, deptId);
       } else {
         getReportMaterial().then((res) => {
           this.tabsItemPantone = res.data;
@@ -410,9 +410,9 @@ export default {
       }
     },
     // 色卡详情
-    getReportMaterialTypeFun(resolve, empLevel) {
-      // empLevel 第一次传 null
-      getReportMaterialType({ materialCode: this.materialCode, empLevel: empLevel }).then((res) => {
+    getReportMaterialTypeFun(resolve, deptId) {
+      // deptId 第一次传 null 获取当前等级下的数据(不需要当前层级)
+      getReportMaterialType({ materialCode: this.materialCode, deptId: deptId }).then((res) => {
         if (res.code == 200) {
           res.data.colorCardList.forEach((val) => {
             if (val.empLevel < 3) val.hasChildren = true;

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

@@ -111,8 +111,8 @@
             </div>
           </div>
         </van-collapse-item>
-        <!-- 色卡 销售员和销售部主管显示-->
-        <van-collapse-item name="4" v-if="empLevel == '2' || empLevel == '3'">
+        <!-- 色卡 -->
+        <van-collapse-item name="4" v-if="empLevel != '4'">
           <template #title>
             <div class="itemHeader" @click.stop>
               <span class="itemTitle">{{ pantone.title }}</span>
@@ -156,7 +156,7 @@
                 </div>
               </div>
             </template>
-            <template v-if="empLevel == '2'">
+            <template v-else>
               <div v-for="(val, key, index) in pantone.pantoneData" :key="index">
                 <div class="title">{{ key }}</div>
                 <div class="pantoneItem">
@@ -487,7 +487,7 @@ export default {
       });
     },
     getPantoneData() {
-      if (this.empLevel == 2 || this.empLevel == 3) {
+      if (this.empLevel !== 4) {
         this.pantone.pantoneLosding = true;
         getReportMaterial().then((res) => {
           this.pantone.pantoneLosding = false;
@@ -522,14 +522,14 @@ export default {
         systemModel: '提示类',
         buryingPointType: 7,
         buryingPointValue: value,
-        buryingPointName: key + '-门店未签收:',
+        buryingPointName: key + '门店未签收:',
         buryingPointPosition: '色卡',
       });
       // 业务员进入未拜访列表
       if (this.empLevel == '3') {
         this.$router.push({ path: '/pantoneNoGet', query: { storeId: val.storeId } });
-      } else if (this.empLevel == '2') {
-        // 销售部主管
+      } else if (this.empLevel != '4') {
+        // 销售部主管,大区,公司
         this.$router.push({
           path: '/hintDetail',
           query: { fromType: 'pantone', materialCode: val.materialCode, pantoneName: key }, // materialCode物料来源