|
@@ -28,7 +28,7 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="data-box">
|
|
|
+ <div class="data-box" v-loading="tableLoading">
|
|
|
<div class="data-select-box">
|
|
|
<div class="table-select-box">
|
|
|
<ul class="status-box">
|
|
@@ -53,10 +53,27 @@
|
|
|
<div class="data-select" v-if="isDataSelectBtnShow&&this.tableData.length">
|
|
|
<el-button type="text" @click="isSelectSaleShow=true"><i class="el-icon-plus" style="font-weight: bold;margin-right: 5px;"/>选择销售</el-button>
|
|
|
</div>
|
|
|
+ <!--非管理员 筛选-->
|
|
|
<div class="data-select" v-if="!isDataSelectBtnShow" style="flex:1;">
|
|
|
<div class="select-box" style="display: flex;justify-content: flex-end;gap: 30px;">
|
|
|
- <el-select placeholder="请选择销售" style="max-width: 240px;"></el-select>
|
|
|
- <el-input prefix-icon="el-icon-search" placeholder="客户名称/社会信用码/手机号码/邮箱" style="max-width:317px;"></el-input>
|
|
|
+ <el-select placeholder="请选择销售" v-if="pageSelect===1"
|
|
|
+ v-model="tableParams.SellerId"
|
|
|
+ @change="handlePageChange(1)"
|
|
|
+ multiple collapse-tags clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in salesArr"
|
|
|
+ :key="item.SellerId"
|
|
|
+ :label="item.RealName"
|
|
|
+ :value="item.SellerId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-input
|
|
|
+ prefix-icon="el-icon-search"
|
|
|
+ placeholder="客户名称/社会信用码/手机号码/邮箱"
|
|
|
+ style="width:317px;" clearable
|
|
|
+ v-model="tableParams.Keywords"
|
|
|
+ @input="handlePageChange(1)"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -98,14 +115,19 @@
|
|
|
</div>
|
|
|
<span v-else-if="item.key==='ViewTotal'" :class="{'editor':row[item.key]>0}" @click="handleDialogShow('click',row)">{{row[item.key]}}</span>
|
|
|
<span v-else-if="item.key==='RoadShowTotal'" :class="{'editor':row[item.key]>0}" @click="handleDialogShow('road',row)">{{row[item.key]}}</span>
|
|
|
+ <span v-else-if="['LastViewTime','CreateTime'].includes(item.key)">{{row[item.key].slice(0,10)}}</span>
|
|
|
<span v-else>{{row[item.key]}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<!-- 管理员展示操作列 -->
|
|
|
<el-table-column label="操作" align="center" v-if="isDataSelectBtnShow">
|
|
|
<template slot-scope="{row}">
|
|
|
- <el-button type="text">{{pageSelect===1?'隐藏':'取消隐藏'}}</el-button>
|
|
|
- <el-button type="text" v-if="pageSelect===1">转正式</el-button>
|
|
|
+ <el-button type="text" v-if="pageSelect===1&&row.IsHide===0" @click="handleSetCustomHide(row)">隐藏</el-button>
|
|
|
+ <el-button type="text" v-if="pageSelect===2&&row.IsHide===1" @click="handleSetCustomHide(row)">取消隐藏</el-button>
|
|
|
+ <!--英文客户且状态为试用-->
|
|
|
+ <el-button type="text" v-if="pageSelect===1&&row.Source===1&&row.CompanyStatus==='试用'" @click="handleSetCustomStatus(row,'change')">转正式</el-button>
|
|
|
+ <!--英文客户且OverseasStatus为正式-->
|
|
|
+ <el-button type="text" v-if="pageSelect===1&&row.Source===1&&row.OverseasStatus==='正式'" @click="handleSetCustomStatus(row,'reset')">重置</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template slot="empty">
|
|
@@ -215,7 +237,10 @@ export default {
|
|
|
isSelectSaleShow: false, //选择销售弹窗
|
|
|
isTotalClickShow:false, //累计点击量弹窗
|
|
|
isRoadDetailShow:false, //路演详情弹窗
|
|
|
- customData:{},
|
|
|
+ customData:{},//选择的客户信息
|
|
|
+
|
|
|
+ tableLoading:false,
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -260,7 +285,9 @@ export default {
|
|
|
this.isSelectSaleShow = false
|
|
|
})
|
|
|
},
|
|
|
+ //客户列表
|
|
|
getTableData() {
|
|
|
+ this.tableLoading = true
|
|
|
const {Keywords,SortField,SortDesc,SellerId,CompanyStatus,tryStatusSelect} = this.tableParams
|
|
|
overseasCustomInterence.getCustomList({
|
|
|
PageSize: this.pageSize,
|
|
@@ -269,9 +296,9 @@ export default {
|
|
|
SellerId:(Array.isArray(SellerId)?SellerId.join(','):'')+'',
|
|
|
OverseasLabel:tryStatusSelect,
|
|
|
CustomType:this.pageSelect,
|
|
|
- SortField:'ViewTotal',
|
|
|
- SortDesc:1,
|
|
|
+ SortField,SortDesc,
|
|
|
}).then(res=>{
|
|
|
+ this.tableLoading = false
|
|
|
if(res.Ret!==200) return
|
|
|
if(!res.Data) return
|
|
|
//客户状态
|
|
@@ -308,7 +335,13 @@ export default {
|
|
|
this.tableParams.tryStatusSelect = item.OverseasLabel
|
|
|
this.handlePageChange(1);
|
|
|
},
|
|
|
- handleSortChange() { },
|
|
|
+ //列表排序
|
|
|
+ handleSortChange({prop,order}) {
|
|
|
+ this.tableParams.SortDesc = order==='ascending'?2:1
|
|
|
+ this.tableParams.SortField = order?prop:'ViewTotal'
|
|
|
+ this.handlePageChange(1)
|
|
|
+ },
|
|
|
+ //切换页码
|
|
|
handlePageChange(page) {
|
|
|
this.currentPage = page;
|
|
|
this.getTableData();
|
|
@@ -327,6 +360,7 @@ export default {
|
|
|
const href = this.$router.resolve({path,query}).href
|
|
|
window.open(href,"_blank")
|
|
|
},
|
|
|
+ //设置客户的试用状态
|
|
|
handleChangeTryStatus(data) {
|
|
|
const { OverseasLabel, CompanyId } = data;
|
|
|
overseasCustomInterence.setCustomTryStatus({
|
|
@@ -337,14 +371,32 @@ export default {
|
|
|
this.getTableData()
|
|
|
})
|
|
|
},
|
|
|
+ //打开累计点击量/路演数量弹窗
|
|
|
handleDialogShow(type,data){
|
|
|
this.customData = data
|
|
|
if(type==='click'){
|
|
|
+ if(!data.ViewTotal>0) return
|
|
|
this.isTotalClickShow = true
|
|
|
}else{
|
|
|
+ if(!data.RoadShowTotal>0) return
|
|
|
this.isRoadDetailShow = true
|
|
|
}
|
|
|
},
|
|
|
+ //设置客户隐藏/取消隐藏
|
|
|
+ handleSetCustomHide({CompanyId}){
|
|
|
+ overseasCustomInterence.setCustomHide({CompanyId}).then(res=>{
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.$message.success(`设置${this.pageSelect===1?'隐藏':'取消隐藏'}成功`)
|
|
|
+ this.handlePageChange(1)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleSetCustomStatus({CompanyId},type){
|
|
|
+ overseasCustomInterence.setCustomStatus({CompanyId}).then(res=>{
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.$message.success(`${type==='reset'?'重置':'转正式'}成功`)
|
|
|
+ this.handlePageChange(1)
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getSavedSales()
|