zhujindu 1 vuosi sitten
vanhempi
commit
dbc6b074f4

+ 0 - 1
src/store/getters.js

@@ -1,5 +1,4 @@
 const getters = {
   userInfo: (state) => state.user.userInfo,
-  // isAssignFlag: (state) => state.user.isAssignFlag,
 };
 export default getters;

+ 0 - 13
src/store/modules/user.js

@@ -5,7 +5,6 @@ const user = {
   state: {
     userInfo: null,
     activaTypeStore: null,
-    isAssignFlag: false, //是否有客资分配权限
   },
 
   mutations: {
@@ -32,7 +31,6 @@ const user = {
             localStorage.setItem('zipPhoto', res.data.zipPhoto);
             localStorage.setItem('deptLevel', res.data.depts[0].deptLevel);
             localStorage.setItem('userId', res.data.userId);
-            dispatch('getAssignPermission');
             resolve();
           })
           .catch((error) => {
@@ -40,17 +38,6 @@ const user = {
           });
       });
     },
-    // 查询当前用户是否存在家装客资分配权限
-    getAssignPermission({ commit }) {
-      selectAllocationPermission()
-        .then((res) => {
-          console.log(res);
-          commit('SET_ASSIGN_FLAG', res.data.isAllocationPermission);
-        })
-        .catch((error) => {
-          console.log(error);
-        });
-    },
     // 储存提示类-未拜访-从那个店铺类型进入未拜访列表
     setActivaTypeStore({ commit }, value) {
       commit('SET_ACTIVA_TYPE_STORE', value);

+ 1 - 1
src/views/clew/index.vue

@@ -111,7 +111,7 @@ export default {
         });
     },
     approveFn(row) {
-      if (row.cid !== 7) {
+      if (row.cid == 7) {
         // 家装客资跟进
         this.$router.push({
           path: '/JZfollowUp',

+ 2 - 0
src/views/week/assignAwait/assignPage.vue

@@ -217,11 +217,13 @@ export default {
       });
     },
     onSubmit() {
+      this.toastLoading(0, '加载中...', true);
       allocationCustomer({
         userId: this.assignUserItem.userId || '', //	string	用户ID
         customerClueInfoId: this.id, //	string	客资主键ID
         customerClassify: this.activaAssignTypeItem.dictValue || '', //	string	客资类型,(取值页面字典选择的值 jz_customer_type)
       }).then((res) => {
+        this.toastLoading().clear();
         if (res.code == 200) {
           this.$toast(res.msg);
           this.onClickLeft();

+ 3 - 7
src/views/week/index.vue

@@ -192,15 +192,9 @@ import storeselect from '@/assets/Icon/storeselect.png';
 import tabBar from '@/components/tabBar';
 import { getReportInfo, getstoreCoverPosition } from '@/api/index';
 import { selectAllocationPermission } from '@/api/week';
-import { mapState } from 'vuex';
 export default {
   name: 'MyList',
   components: { tabBar },
-  computed: {
-    ...mapState({
-      isAssignFlag: (state) => state.user.isAssignFlag,
-    }),
-  },
   data() {
     return {
       history: history,
@@ -233,6 +227,7 @@ export default {
       customerClueNum: 0,
       thisWeekRemarkNum: null,
       notAllocationNum: 0, //待分配客资数量
+      isAssignFlag: false,
     };
   },
   watch: {
@@ -299,7 +294,7 @@ export default {
         forbidClick: true,
       });
       // 如果有客资分配权限,获取待分配客资数量
-      if (this.isAssignFlag) this.getSelectAllocationPermission();
+      this.getSelectAllocationPermission();
       getReportInfo({ isContent: false }).then((res) => {
         loading1.clear();
         this.list = res.data.summaryTasks;
@@ -341,6 +336,7 @@ export default {
     getSelectAllocationPermission() {
       selectAllocationPermission()
         .then((res) => {
+          this.isAssignFlag = res.data.isAllocationPermission;
           this.notAllocationNum = res.data.notAllocationNum;
         })
         .catch((error) => {