Просмотр исходного кода

修改客户详情页的赢单跟进状态展示

lm 4 недель назад
Родитель
Сommit
66cb00d60f

+ 30 - 3
src/components/FollowCard.vue

@@ -15,10 +15,21 @@
                                 :key="index" 
                                 :disable-transitions="true"
                                 type="success" effect="light" size="small" 
-                                class="status_tag">
+                                class="status_tag wait">
                             {{ tag }}
                         </el-tag>
                     </template>
+
+                    <template v-if="item?.statusTag?.length > 0">
+                        <el-tag v-for="(tag,index) in item.statusTag" 
+                                :key="index" 
+                                :disable-transitions="true"
+                                type="success" effect="light" size="small" 
+                                :class="['status_tag',tag.className]">
+                            {{ tag.name }}
+                        </el-tag>
+                    </template>
+                    
                     <span v-if="item.taskType" class="task_type">{{item.taskType}}</span>
                     <span v-if="item.productType" class="product_type">{{item.productType}}</span>
                 </div>
@@ -47,6 +58,7 @@ interface AuditItm {
     id:string | number,
     headerTitleList:Array<string>,
     headerTags:Array<string>,
+    statusTag:Array<{name:string,className:string}>,  // 不同颜色的tag展示 
     taskType:string,
     productType:string,
     middleDesc:Array<string>,
@@ -97,10 +109,25 @@ const props = defineProps({
                     padding:0 8px;
                     font-weight: 400;
                     font-size: 12px;
-                    background: rgba(46,100,250,0.1);
                     border-radius: 4px;
-                    color: #2E64FA;
+
+                    &.success{
+                        background: rgba(43, 198, 68,0.1);
+                        color: #2BC644;
+                    }
+
+                    &.reject{
+                        background: rgba(245, 108, 108,0.1);
+                        color: #F56C6C;
+                    }
+
+                    &.wait{
+                        background: rgba(46,100,250,0.1);
+                        color: #2E64FA;
+                    }
                 }
+
+
                 .task_type{
                     font-size: 12px;
                     font-weight: 400;

+ 43 - 0
src/components/dict.ts

@@ -1,4 +1,6 @@
 import { ref } from "vue"
+
+/**1. 性别转换 */
 const genderList = ref([
     {
         label:"男",
@@ -20,6 +22,9 @@ export const genderNumToName = (num)=>{
     })?.label
 }
 
+/**
+ * 2. 账户的启用/禁用
+ */
 const accountStatusList = ref([
     {
         label:'启用',
@@ -30,6 +35,7 @@ const accountStatusList = ref([
         value:0
     },
 ])
+
 export const accountStatusMsg = ref([
     {
         statusFlag:1,
@@ -49,3 +55,40 @@ export const accountNumToName = (num)=>{
     })?.label
 }
 
+
+/** 3. 赢单的审核状态  */
+export const winnerCaseStatusList = ref([
+    {
+        label:"审核中",
+        value:0,
+        className:'wait'
+    },
+    {
+        label:"已通过",
+        value:1,
+        className:'success'
+
+    },
+    {
+        label:"已驳回",
+        value:2,
+        className:'reject'
+    },
+])
+
+export const winnerCaseStatusToName = (status:number)=>{
+    return winnerCaseStatusList.value.find(item=>{
+        return item.value === status
+    })?.label
+}
+
+
+export const winnerCaseStatusMsg = (status:number)=>{
+    let aim = winnerCaseStatusList.value.find(item=>{
+        return item.value === status
+    })
+    return {
+        name:aim?.label,
+        className:aim?.className
+    }
+}

+ 7 - 3
src/views/highSeasCustomer/highSeasCustomerDetail/customerStatusOverview/index.vue

@@ -85,6 +85,8 @@ import {
     getHighSeasCustomerDetailApi,
 } from '@/api/highSeasCustomer'
 
+import {winnerCaseStatusMsg} from '@/components/dict'
+
 interface ProductStatusItm {
     productId:string,
     productName:string,
@@ -227,9 +229,10 @@ const GetHighSeasCustomerDetail = async ()=>{
                 headerTags.push(item.followName)
             }
 
-            // 审核状态:0-待审核,1-已通过,2-已驳回
-            if(item.auditStatus || item.auditStatus === 0){
-                headerTags.push(item.auditStatus === 0 ? '待审核' : (item.auditStatus === 1 ? '已通过' : '已驳回') )
+            let statusTag = []
+            //  auditStatus 审核状态:0-待审核,1-已通过,2-已驳回   successStatus 是否是赢单 0否 1是
+            if([0,1,2].includes(item.auditStatus) && item.successStatus === 1){
+                statusTag.push(winnerCaseStatusMsg(item.auditStatus))
             }
             return {
                 headerTitleList:[
@@ -238,6 +241,7 @@ const GetHighSeasCustomerDetail = async ()=>{
                     item.productName
                 ],
                 headerTags,
+                statusTag,
                 middleDesc:[
                     `跟进人:${item.claimUserName}`,
                     `联系人:${item.customerPersonName}`,

+ 7 - 3
src/views/myCustomer/myCustomerDetail/customerStatusOverview/index.vue

@@ -203,6 +203,8 @@ import CancelAppointmentDialog from '@/components/CancelAppointmentDialog/index.
 import {getOverviewDetailApi,getHistoryFollowListApi} from '@/api/myCustomer'
 import {closeToDoTaskApi} from '@/api/appointmentAndTodo'
 
+import {winnerCaseStatusMsg} from '@/components/dict'
+
 import {
     getTodayRange,
     getYesterdayRange,
@@ -339,9 +341,10 @@ const GetOverviewDetail = async ()=>{
                 headerTags.push(item.followName)
             }
 
-            // 审核状态:0-待审核,1-已通过,2-已驳回
-            if(item.auditStatus || item.auditStatus === 0){
-                headerTags.push(item.auditStatus === 0 ? '待审核' : (item.auditStatus === 1 ? '已通过' : '已驳回') )
+            let statusTag = []
+            //  auditStatus 审核状态:0-待审核,1-已通过,2-已驳回   successStatus 是否是赢单 0否 1是
+            if([0,1,2].includes(item.auditStatus) && item.successStatus === 1){
+                statusTag.push(winnerCaseStatusMsg(item.auditStatus))
             }
             return {
                 headerTitleList:[
@@ -350,6 +353,7 @@ const GetOverviewDetail = async ()=>{
                     item.productName
                 ],
                 headerTags,
+                statusTag,
                 middleDesc:[
                     `跟进人:${item.claimUserName}`,
                     `联系人:${item.customerPersonName}`,