Browse Source

Merge branch 'crm13.7' and fix conflict

cxmo 1 năm trước cách đây
mục cha
commit
a17a140405

+ 30 - 2
src/api/modules/crmApi.js

@@ -289,15 +289,29 @@ const customInterence = {
   },
   /* 获取试用用户列表 */
   trialList: (params) => {
-    console.log(params);
     return http.get("/custom/official/user/list", params);
     // return http.get('/api/adminapi/custom/official/user/list?PageSize=10&CurrentIndex=1&SourceType=中文官网', params)
   },
   /* 试用用户确认已处理接口 */
   trialStatus: (params) => {
-    console.log(params);
     return http.post("/custom/official/user/confirm", params);
   },
+  /* 标记研报申请分组
+    ApplyRecordId
+    GroupName
+    UserId
+   */
+  markApplyUser:(params)=>{
+      return http.post('/yb/apply_record/mark_group',params)
+  },
+  /**
+   * 标记官网试用申请
+   * Id
+   * GroupName
+   */
+  markOfficialUser:(params)=>{
+      return http.post('/custom/official/user/mark_group',params)
+  },
   /* 搜索公司 KeyWord  */
   companySearch: (params) => {
     return http.get("/custom/potential/company/search", params);
@@ -519,6 +533,20 @@ const customInterence = {
     deleteRemark:(params)=>{
         return http.post("/custom/remark/del",params)
     },
+    /*
+     * 标记服务记录
+     * CompanyServiceRecordId
+     * Status 0取消标记 1标记
+     */
+    markRecord:(params)=>{
+        return http.post('/custom/share/mark',params)
+    },
+    /**
+     * 同城客户列表
+     */
+    getCustomCityList:(params)=>{
+        return http.get('/custom/share/list/city',params)
+    },
   /* 审批列表
 		PageSize *
 		CurrentIndex *

+ 10 - 0
src/routes/modules/customRoutes.js

@@ -33,6 +33,16 @@ export default [
         name: "正式客户共享",
         hidden: false,
       },
+      {
+        path: 'customCityList',
+        component: () => import('@/views/custom_manage/customList/customCityList.vue'),
+        name: '查看同城客户',
+        hidden: false,
+        meta: {
+            pathFrom: 'customShareList',
+            pathName: '正式客户共享'
+        }
+      },
       {
         path: "customAllList",
         component: () => import("@/views/custom_manage/customList/customAllList.vue"),

+ 29 - 1
src/views/custom_manage/customList/components/shareListDialog.vue

@@ -25,6 +25,7 @@
                 <el-table 
                     border 
                     :data="recordList"
+                    :row-class-name="tableRowClassName"
                     v-loading="tableLoading">
                     <el-table-column v-for="column in tableColumns" :key="column.key"
                         :prop="column.key"
@@ -37,8 +38,12 @@
                         v-if="allowEdit"
                         label="操作"
                         align="center"
+                        width="160"
                     >
-                    <template slot-scope="{row}">
+                    <template slot-scope="{row,$index}">
+                        <el-button type="text" size="small" style="color:#409eff;"
+                            @click="markRecord(row,$index)"
+                        >{{row.Mark?'取消标记':'标记'}}</el-button>
                         <el-button type="text" size="small" style="color:red;"
                             @click="deleteRecord(row)"
                         >删除</el-button>
@@ -114,6 +119,12 @@ export default {
                 this.tableLoading = false
             })
         },
+        tableRowClassName({row}){
+            if(row.Mark){
+                return 'mark-row'
+            }
+            return ''
+        },
         addNewRecord(){
             if(!this.recordContent.length){
                 this.$message.warning('请输入服务描述')
@@ -146,6 +157,17 @@ export default {
                 })
             })
         },
+        markRecord(data,index){
+            customInterence.markRecord({
+                CompanyServiceRecordId:data.CompanyServiceRecordId,
+                Status:data.Mark?0:1
+            }).then(res=>{
+                if(res.Ret!==200) return 
+                this.$message.success(`${data.Mark?'取消标记':'标记'}成功`)
+                this.getRecordList()
+            })
+
+        },
         closeDia(){
             this.$emit('close')
         }
@@ -174,6 +196,12 @@ export default {
                 .el-table__empty-block{
                     border-bottom: 1px solid #EBEEF5;
                 }
+                .mark-row{
+                    background: #FEF0F0;
+                    &:hover>td{
+                        background-color: #FEF0F0 !important;
+                    }
+                }
             }
         }
     }

+ 147 - 0
src/views/custom_manage/customList/customCityList.vue

@@ -0,0 +1,147 @@
+<template>
+    <div class="custom-city-list-wrap">
+        <div class="select-box box-wrap">
+            <el-cascader v-model="searchCitys" 
+                :props="{multiple: true,value:'name',children:'city',label:'name'}" 
+                :options="locationOptions"
+                clearable collapse-tags 
+                placeholder="请选择客户地址"
+                @change="handleChangeLocation" >
+            </el-cascader>
+            <el-input placeholder="客户名称/原销售/分配销售" 
+                prefix-icon="el-icon-search" 
+                v-model="searchText" 
+                clearable
+                @input="getTableList"></el-input>
+        </div>
+        <div class="table-box box-wrap">
+            <el-table :data="tableData" border>
+                <el-table-column 
+                    v-for="item in tableColumns" :key="item.key"
+                    :label="item.label" align="center"
+                    >
+                    <template slot-scope="{row}">
+                        {{ row[item.key] }}
+                    </template>
+                </el-table-column>
+            </el-table>
+            <el-pagination 
+                layout="prev,pager,next,total" 
+                background
+                :current-page="pageNo"
+                @current-change="currentChange"
+                :page-size="pageSize" 
+                :total="total"
+                >
+            </el-pagination>
+        </div>
+    </div>
+</template>
+
+<script>
+import {locationOptions} from "./location"
+import { customInterence } from '@/api/api.js'
+export default {
+    data() {
+        this.locationOptions = locationOptions
+        return {
+            searchCitys:[],
+            provinceValue:'',
+            cityValue:'',
+            searchText:'',
+            tableColumns:[
+                {
+                    label:'客户名称',
+                    key:'CompanyName'
+                },{
+                    label:'类型',
+                    key:'CompanyType'
+                },{
+                    label:'所属行业',
+                    key:'IndustryName'
+                },{
+                    label:'客户地址',
+                    key:'City'
+                },{
+                    label:'原销售',
+                    key:'SellerName'
+                },{
+                    label:'分配销售',
+                    key:'ShareSeller'
+                },{
+                    label:'状态',
+                    key:'Status'
+                }
+            ],
+            tableData:[],
+            tableLoading:false,
+            pageNo:1,
+            pageSize:10,
+            total:0,
+        };
+    },
+    methods: {
+        handleChangeLocation(){
+            const provinceArr = []
+            const cityArr = []
+            this.searchCitys.forEach(item=>{
+                // 省
+                provinceArr.push(item[0])
+                // 市
+                cityArr.push(item[1])
+            })
+        //provinceArr需要去重
+            this.provinceValue = [...new Set(provinceArr)].join(',')
+            this.cityValue = cityArr.join(',')
+            this.page_no = 1;
+            this.getTableList();
+        },
+        getTableList(){
+            this.tableLoading=true
+            customInterence.getCustomCityList({
+                PageSize:this.pageSize,
+                CurrentIndex:this.pageNo,
+                Keyword:this.searchText,
+                Province:this.provinceValue,
+                City:this.cityValue
+            }).then(res=>{
+                if(res.Ret!==200) return
+                this.tableData = res.Data.List
+                this.total = res.Data.Paging.Totals
+            })
+            
+        },
+        currentChange(page){
+            this.pageNo=page
+            this.getTableList()
+        }
+    },
+    mounted(){
+        this.getTableList()
+    }
+};
+</script>
+
+<style scoped lang="scss">
+.custom-city-list-wrap{
+    .box-wrap{
+        padding:30px;
+        background-color: #fff;
+        border-radius: 4px;
+    }
+    .select-box{
+        display: flex;
+        justify-content: space-between;
+        .el-input{
+            width:400px;
+        }
+    }
+    .table-box{
+        margin-top: 30px;
+        .el-pagination{
+            margin-top: 30px;
+            text-align: right;
+        }
+    }
+}
+</style>

+ 4 - 1
src/views/custom_manage/customList/customShareList.vue

@@ -12,6 +12,9 @@
             <el-option :label="item.RealName" :value="item.AdminId" v-for="item in salesArr" :key="item.AdminId" ></el-option>
           </el-select>
         </div>
+        <div v-else>
+            <el-button type="primary" @click="$router.push('/customCityList')">查看同城客户</el-button>
+        </div>
         <el-input 
           placeholder="客户名称/社会信用码/手机号码/邮箱"
           v-model="search_txt"
@@ -92,7 +95,7 @@
 					</el-table-column>
 					<el-table-column
 					prop="SellerName"
-					label="销售"
+					label="销售"
 					min-width="6.14%"
 					align="center">
 						<template slot-scope="scope"> 

+ 134 - 35
src/views/ficc_manage/userApplication.vue

@@ -2,26 +2,40 @@
   <div class="container-userapplication">
     <div class="userapplication-top">
       <div class="top-tabs">
-        <span v-for="item in Tabs" :key="item.name" @click="handleTabsClick(item)" :class="activeName == item.type ? 'active' : ''">
+        <!-- <span v-for="item in Tabs" :key="item.name" @click="handleTabsClick(item)" :class="activeName == item.type ? 'active' : ''">
           {{ item.name }}
-        </span>
+        </span> -->
+        <el-radio-group v-model="activeItem" @input="handleTabsClick(activeItem)">
+            <el-radio-button :label="item" v-for="item in Tabs" :key="item.name">{{item.name}}</el-radio-button>
+        </el-radio-group>
       </div>
-      <div class="export-select">
-        <a style="width:80px; margin-right: 20px" :href="exportUrl" download v-if="Tabs.length>1">
+    </div>
+    <el-card style="margin-top: 20px">
+        <div class="export-select">
+        <!-- <a style="width:80px; margin-right: 20px" :href="exportUrl" download v-if="Tabs.length>1">
           <el-button type="primary" style="width: 100%"  >导出</el-button>
-        </a>
-        <el-select v-if="activeName == 1" v-model="custom_apply_type" placeholder="请选择申请类型" style="width: 300px; margin-right: 20px" clearable>
+        </a> -->
+        <date-picker 
+            v-model="date_range" 
+            type="date" 
+            range
+            value-type="format"
+            :placeholder="`请选择${activeName===1?'提交':activeName===2?'申请':'发送'}时间`"
+            @change="changeQuery">
+        </date-picker>
+        <el-select v-if="activeName == 1" v-model="custom_apply_type" placeholder="请选择申请类型" style="width: 160px;" clearable @change="changeQuery">
           <el-option v-for="item in applyArr" :key="item.name" :label="item.name" :value="item.name"> </el-option>
         </el-select>
-        <el-select v-if="activeName == 1" v-model="custom_type" placeholder="请选择状态" style="width: 300px; margin-right: 20px" clearable multiple>
+        <el-select v-if="activeName == 1" v-model="custom_type" placeholder="请选择用户状态" style="width: 200px;" clearable multiple @change="changeQuery">
           <el-option v-for="item in statusArr" :key="item.name" :label="item.name" :value="item.name"> </el-option>
         </el-select>
-        <el-input placeholder="姓名/手机号/邮箱/公司名称" v-model="search_txt" clearable style="max-width: 500px">
+        <el-select v-model="group_type" placeholder="请选择分组" style="width: 160px;" clearable @change="changeQuery">
+          <el-option v-for="item in groupArr" :key="item.name" :label="item.name" :value="item.name"> </el-option>
+        </el-select>
+        <el-input placeholder="姓名/手机号/邮箱/公司名称" v-model="search_txt" clearable style="max-width: 240px" @input="changeQuery">
           <i slot="prefix" class="el-input__icon el-icon-search"></i>
         </el-input>
       </div>
-    </div>
-    <el-card style="margin-top: 20px">
       <el-table :data="tableData" v-loading="tableLoading" element-loading-text="数据加载中..." border>
         <el-table-column v-for="item in tableColums" :key="item.label" :label="item.label" :width="item.widthsty" :min-width="item.minwidthsty" align="center">
           <template slot-scope="{ row }">
@@ -47,16 +61,23 @@
             <span v-else>{{ row[item.key] }}</span> -->
           </template>
         </el-table-column>
+        <el-table-column label="分组" align="center">
+            <template slot-scope="{ row }">
+                <span>{{row.MarkGroup}}</span>
+            </template>
+        </el-table-column>
         <el-table-column label="操作" align="center">
           <template slot-scope="{ row }">
             <div v-if="activeName == 1">
-              <span class="editsty" v-if="row.OpStatus === 0 && row.IsMove === 0&&!(row.Status==='潜在用户'||row.Status==='流失')" @click="dealHandle(row)">标记处理</span>
-              <span class="editsty" v-if="row.IsMove === 0" @click="moveHandle(row)">移动</span>
+             <!--  <span class="editsty" v-if="row.OpStatus === 0 && row.IsMove === 0&&!(row.Status==='潜在用户'||row.Status==='流失')" @click="dealHandle(row)">标记处理</span> -->
+              <span class="editsty" v-if="row.OpStatus === 0 && row.IsMove === 0&&!(row.Status==='潜在用户'||row.Status==='流失')" @click="handleChooseGroup(row)">标记</span>
             </div>
             <div v-else>
-              <span class="editsty" v-if="row.Status==='待处理'" @click="dealHandle(row)">标记处理</span>
+              <!-- <span class="editsty" v-if="row.Status==='待处理'" @click="dealHandle(row)">标记处理</span> -->
+              <span class="editsty" v-if="row.Status==='待处理'" @click="handleChooseGroup(row)">标记</span>
             </div>
-            <span class="editsty" style="color:#ff0000" v-if="row.DelBtn" @click="delHandle(row)">删除</span>
+            <span class="editsty" v-if="activeName == 1&&row.IsMove === 0" @click="moveHandle(row)">移动</span>
+            <!-- <span class="editsty" style="color:#ff0000" v-if="row.DelBtn" @click="delHandle(row)">删除</span> -->
           </template>
         </el-table-column>
         <div slot="empty" style="padding: 20px 0">
@@ -74,6 +95,27 @@
     <intervewDia :isShowDia.sync="isShowDia" :item="dealObj" v-if="isShowDia" :activeName="activeName"/>
     <!-- 移动弹窗 -->
     <moveCustomDia :isShow.sync="isShowMoveDia" :item="dealObj" v-if="isShowMoveDia" />
+    <!-- 标记分组弹窗 -->
+    <el-dialog
+        v-dialogDrag 
+        :visible.sync="isChooseGroupDialogShow"
+        :close-on-click-modal="false"
+        :modal-append-to-body="false"
+        title="标记" width="480px" center
+        @close="isChooseGroupDialogShow=false">
+        <div class="dialog-container">
+            <div class="select" style="display:flex;align-items: center;">
+                <span>分组:</span>
+                <el-select v-model="choosed_group" placeholder="请选择分组" style="flex:1;margin-left: 10px;">
+                    <el-option v-for="item in groupArr" :key="item.name" :label="item.name" :value="item.name"> </el-option>
+                </el-select>
+            </div>
+        </div>
+        <div style="display:flex;justify-content:center;margin:20px 0;">
+            <el-button type="primary" style="width:80px;marginRight:24px;" @click="chooseGroup">保存</el-button>
+            <el-button type="primary" plain style="width:80px;" @click="isChooseGroupDialogShow=false">取消</el-button>
+        </div>
+	</el-dialog>
   </div>
 </template>
 
@@ -94,6 +136,7 @@ export default {
       tableData: [],
       tableColums: [],
       activeName: 1,
+      activeItem: { name: "弘则研报", type: 1 },
       total: 0,
       page_no: 1,
       pageSize: 10,
@@ -109,8 +152,18 @@ export default {
         { name: "冻结", value: 4 },
         {name:'试用暂停',value:5}
       ],
+      groupArr:[
+        {name:"楼颖丹组",value:"楼颖丹组"},
+        {name:"时代组",value:"时代组"},
+        {name:"岳梦琳组",value:"岳梦琳组"},
+        {name:"权益组",value:"权益组"}
+        ],
+      choosed_group:'',
+      choosed_row:null,
       custom_type:[],
       custom_apply_type:'',//申请类型
+      date_range:[],
+      group_type:'',
       applyArr:[
         {name:'已申请',value:'已申请'},
         {name:'未申请',value:'未申请'},
@@ -122,6 +175,7 @@ export default {
       dealObj: {},
       isShowDia: false, //处理弹窗
       isShowMoveDia: false, //移动弹窗
+      isChooseGroupDialogShow:false
     };
   },
   computed: {
@@ -147,26 +201,17 @@ export default {
       return this.custom_type.join(',')
     },//筛选客户的类型,可多选
   },
-  watch: {
-    search_txt(newval) {
-			this.page_no = 1;
-			this.getTableData();
-		},
-		custom_type(newval) {
-			this.page_no = 1;
-			this.getTableData();
-		},
-    custom_apply_type(newval){
-      this.page_no = 1;
-			this.getTableData();
-    }
-  },
+  watch: {},
   created() {},
   mounted() {
     this.tableColums = tableColums(1);
     this.getTableData();
   },
   methods: {
+    changeQuery(){
+        this.page_no = 1
+        this.getTableData()
+    },
     /* 获取表格数据 */
     async getTableData() {
       this.tableLoading = true;
@@ -177,13 +222,19 @@ export default {
               CurrentIndex: this.page_no,
               KeyWord: this.search_txt,
               States: this.search_type,
-              ApplyStatus:this.custom_apply_type
+              ApplyStatus:this.custom_apply_type,
+              MarkGroup:this.group_type,
+              StartDate:this.date_range[0],
+              EndDate:this.date_range[1],
             })
           : await customInterence.trialList({
-              PageSize: 10,
+              PageSize: this.pageSize,
               CurrentIndex: this.page_no,
               SourceType: this.activeName == 2 ? "中文官网" : this.activeName == 3 ? "英文官网" : "",
               KeyWord: this.search_txt,
+              MarkGroup:this.group_type,
+              StartDate:this.date_range[0],
+              EndDate:this.date_range[1],
             });
 
       if (res.Ret === 200) {
@@ -198,6 +249,13 @@ export default {
         this.activeName = item.type;
         this.tableColums = tableColums(this.activeName);
       }
+      //重置筛选项
+      this.search_txt=''
+      this.custom_type=[]
+      this.custom_apply_type=[]
+      this.date_range=[]
+      this.group_type=''
+
       this.page_no = 1;
       this.getTableData();
     },
@@ -236,10 +294,10 @@ export default {
       this.isRead = true;
     },
     /* 关闭阅读报告弹窗 */
-		cancelRead() {
-			this.readTit = '阅读报告列表';
-			this.isRead = false;
-		},
+    cancelRead() {
+        this.readTit = '阅读报告列表';
+        this.isRead = false;
+    },
     // 移动
     moveHandle(item) {
       this.dealObj = item;
@@ -269,12 +327,44 @@ export default {
       }).catch(() => {
                   
       });
+    },
+    //打开标记分组弹窗
+    handleChooseGroup(row){
+        this.choosed_row = row
+        this.isChooseGroupDialogShow = true
+    },
+    //标记分组
+    async chooseGroup(){
+        if(!this.choosed_group){
+            this.$message.warning('请选择分组')
+            return 
+        }
+        const {ApplyRecordId,UserId,Id} = this.choosed_row
+        //请求接口
+        const res = this.activeName===1?await customInterence.markApplyUser({
+            ApplyRecordId,UserId,GroupName:this.choosed_group
+        }):await customInterence.markOfficialUser({Id,GroupName:this.choosed_group})
+
+        if(res.Ret!==200) return 
+        this.$message.success('标记分组成功')
+        this.isChooseGroupDialogShow = false
+        this.choosed_group=''
+        this.getTableData()
+        
     }
   },
 };
 </script>
-<style scoped lang="less">
+<style lang="scss">
+.container-userapplication{
+    .mx-datepicker{
+        width:200px !important;
+    }
+}
+</style>
+<style scoped lang="scss">
 .container-userapplication {
+    min-width: 1500px;
   .userapplication-top {
     display:flex;
     align-items:center;
@@ -305,10 +395,19 @@ export default {
       color: #409eff;
       border-radius: 4px;
       margin-right: 20px;
+      cursor: pointer;
     }
   }
   .export-select {
     display: flex;
+    flex: 1;
+    justify-content: flex-start;
+    align-items: flex-start;
+    gap: 10px;
+    margin-bottom: 20px;
+    .el-input{
+        margin-left: auto;
+    }
   }
 }
 </style>