瀏覽代碼

家装客资

zhujindu 1 年之前
父節點
當前提交
063313fff7

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

@@ -23,7 +23,6 @@ const user = {
   actions: {
     // 获取用户信息
     getUserInfo({ dispatch, commit, state }) {
-      dispatch('getAssignPermission');
       return new Promise((resolve, reject) => {
         getMobileUserInfo()
           .then((res) => {

+ 46 - 1
src/views/week/assignAwait/JZfollowUp.vue

@@ -22,14 +22,39 @@
         转交下属
       </van-button>
     </assignAwaitDetail>
+    <!-- 历史跟进记录 -->
+    <p style="margin: 0 16px 8px; color: #888" v-if="infoData.userCustomerClueList">
+      该客资历史跟进记录
+    </p>
+    <van-cell-group inset class="cardclewContentCell">
+      <div style="border-radius: 6px; overflow: hidden">
+        <van-cell
+          is-link
+          v-for="(item, index) in infoData.userCustomerClueList"
+          :key="index"
+          @click="viewFn(item.userCustomerClueId)">
+          <template #title>
+            <span class="custom-title">{{ item.nickName }}</span>
+          </template>
+          <div class="cardContent">
+            <p class="textLeft" style="padding-bottom: 0px; margin: 0">{{ item.createTime }}</p>
+          </div>
+        </van-cell>
+      </div>
+    </van-cell-group>
     <!-- 跟进任务填写 -->
     <div class="assign">
       <div class="followUp required">跟进结果</div>
-      <div
+      <!-- <div
         class="taskGather"
         v-if="taskGather && taskGather.customerClueItemList.customerClueOptionList">
         <radioGroup
           :clueOptionList="taskGather.customerClueItemList.customerClueOptionList"></radioGroup>
+      </div> -->
+      <div v-if="infoData.isClose != 1" class="tc" style="padding: 0 16px">
+        <van-button class="submitBtn" block type="info" color="#0057ba" @click="onSubmit">
+          提交
+        </van-button>
       </div>
     </div>
     <!-- 转交下属 -->
@@ -41,6 +66,16 @@
         @confirm="confirm"
         @cancel="showPicker = false" />
     </van-popup>
+    <!-- 客资跟进历史 -->
+    <van-dialog
+      v-model="showView"
+      title="客资历史"
+      show-cancel-button
+      cancel-button-text="关闭"
+      :show-confirm-button="false"
+      class="dialogz">
+      <followUpHistory :historyId="historyId"></followUpHistory>
+    </van-dialog>
   </div>
 </template>
 
@@ -55,12 +90,14 @@ import {
 } from '@/api/assignAwait';
 import { mapState } from 'vuex';
 import radioGroup from './radioGroup';
+import followUpHistory from './followUpHistory';
 
 export default {
   name: 'assignPage',
   components: {
     assignAwaitDetail,
     radioGroup,
+    followUpHistory,
   },
   computed: {
     ...mapState({
@@ -77,6 +114,8 @@ export default {
       showPicker: false,
       assignTypeData: [],
       taskGather: null, //跟进任务集合
+      showView: false,
+      historyId: '',
     };
   },
   watch: {},
@@ -143,6 +182,12 @@ export default {
         }
       });
     },
+    // 查看历史跟进记录
+    viewFn(val) {
+      //   this.viewTextShow = false;
+      this.historyId = val;
+      this.showView = true;
+    },
     onSubmit() {
       //   allocationCustomer({
       //     userId: this.assignUserItem.userId || '', //	string	用户ID

+ 28 - 0
src/views/week/assignAwait/followUpHistory.vue

@@ -0,0 +1,28 @@
+<template>
+  <div class="followUpHistory">followUpHistory</div>
+</template>
+<script>
+import { getCustomerClueAnswerById } from '@/api/clew';
+export default {
+  props: {
+    historyId: {
+      type: [String, Number],
+      default: '',
+    },
+  },
+  data() {
+    return {};
+  },
+  activated() {
+    this.getFollowUpHistory();
+  },
+  methods: {
+    getFollowUpHistory(val) {
+      this.toastLoading(0, '加载中...', true);
+      getCustomerClueAnswerById({ userCustomerClueId: this.historyId }).then((res) => {
+        this.toastLoading().clear();
+      });
+    },
+  },
+};
+</script>

+ 17 - 2
src/views/week/index.vue

@@ -67,8 +67,10 @@
             <van-icon :name="history" class="zicon" />
           </template>
           <template #title>
-            <span>客资任务</span>
-            &nbsp;<van-tag type="danger" v-if="customerClueNum > 0">{{ customerClueNum }}</van-tag>
+            <span>待分配客资</span>
+            &nbsp;<van-tag type="danger" v-if="notAllocationNum > 0">{{
+              notAllocationNum
+            }}</van-tag>
           </template>
           <template #right-icon>
             <van-icon name="arrow" size="16" />
@@ -189,6 +191,7 @@ import Weekly from '@/assets/Weekly.png';
 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',
@@ -229,6 +232,7 @@ export default {
       customerClueButton: false,
       customerClueNum: 0,
       thisWeekRemarkNum: null,
+      notAllocationNum: 0, //待分配客资数量
     };
   },
   watch: {
@@ -294,6 +298,8 @@ export default {
         message: '加载中...',
         forbidClick: true,
       });
+      // 如果有客资分配权限,获取待分配客资数量
+      if (this.isAssignFlag) this.getSelectAllocationPermission();
       getReportInfo({ isContent: false }).then((res) => {
         loading1.clear();
         this.list = res.data.summaryTasks;
@@ -332,6 +338,15 @@ export default {
         }
       });
     },
+    getSelectAllocationPermission() {
+      selectAllocationPermission()
+        .then((res) => {
+          this.notAllocationNum = res.data.notAllocationNum;
+        })
+        .catch((error) => {
+          console.log(error);
+        });
+    },
     login() {
       if (this.num > 10) {
         this.$router.push('/login');