|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="dataReport-container">
|
|
|
+ <div class="dataReport-container" id="dataReport-container">
|
|
|
<div class="dataReport-top">
|
|
|
<a :href="exportExcel" download>
|
|
|
<button class="button-sty act">导出EXCEL</button>
|
|
@@ -133,7 +133,22 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div class="tabs-box" v-if="filterObj.data_type=='未续约客户'">
|
|
|
- <span @click="tabsHandler(item)" :class="tabsActiveName===item.value ? 'active':''" v-for="item in tabsList" :key="item">{{item.name}}({{item.name==='试用'?NotRenewalTryOut:NotRenewalNotTryOut}})</span>
|
|
|
+ <el-radio-group v-model="isNotRenewedConfirm" class="tabs-box-confirm" @change="notRenewedConfirmChange">
|
|
|
+ <el-radio-button :label="1">已确认</el-radio-button>
|
|
|
+ <div class="center-line"></div>
|
|
|
+ <el-radio-button :label="0">待确认</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ <div class="tabs-box-status" v-show="isNotRenewedConfirm">
|
|
|
+ <el-select v-model="noRenewalReasonId" placeholder="请选择不续约归因"
|
|
|
+ clearable @change="getTableData" style="width: 240px;margin-right: 50px;">
|
|
|
+ <el-option :label="item.AscribeContent" :value="item.CompanyAscribeId"
|
|
|
+ v-for="item in noRenewalReasonList" :key="item.reasonId"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <span @click="tabsHandler(item)" :class="tabsActiveName===item.value ? 'active':''"
|
|
|
+ v-for="item in tabsList" :key="item">
|
|
|
+ {{item.name}}({{item.name==='试用'?NotRenewalTryOut:NotRenewalNotTryOut}})
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
@@ -148,7 +163,7 @@
|
|
|
:label="item.label"
|
|
|
:width="item.widthsty"
|
|
|
align="center"
|
|
|
- v-if="!item.dataType || item.dataType === filterObj.data_type">
|
|
|
+ v-if="controlTableColumnShow(item)">
|
|
|
<template slot-scope="scope">
|
|
|
<span
|
|
|
:style="item.textsty"
|
|
@@ -175,6 +190,17 @@
|
|
|
{{scope.row.PackageDifference}}
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else-if="item.key==='Remark' " class="remark-row">
|
|
|
+ <span class="remark-text" @click="viewHistoryRemarkFun(scope.row)" v-if="scope.row.IsShowNoRenewedNote">...</span>
|
|
|
+ <span class="operation-button" v-show="canConfirmNotRenewed && (!isNotRenewedConfirm)"
|
|
|
+ style="margin-right: 0;" @click="addRemarkFun(scope.row)">添加</span>
|
|
|
+ </div>
|
|
|
+ <div v-else-if="item.key=='AscribeContent'">
|
|
|
+ <span style="color: #409EFF;cursor: pointer;"
|
|
|
+ @click="editReasonLabel(scope.row)" >
|
|
|
+ {{scope.row[item.key]}}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
<span
|
|
|
v-else
|
|
|
:style="item.textsty"
|
|
@@ -186,6 +212,14 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
+ <el-table-column label="操作" width="180px" align="center"
|
|
|
+ v-if="canConfirmNotRenewed && (!isNotRenewedConfirm) && filterObj.data_type =='未续约客户'" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="operation-row">
|
|
|
+ <span class="operation-button" @click="confirmedNoRenewalFun(scope.row)">确认不续约</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<div slot="empty" style="lineHeight:44px;margin:60px 0;color:#999;">
|
|
|
<img src="~@/assets/img/cus_m/nodata.png" alt="" style="display:block;width:160px;height:128px;margin: auto;">
|
|
|
<span>暂无数据</span>
|
|
@@ -200,6 +234,13 @@
|
|
|
</div>
|
|
|
<!-- 未续约说明列表弹窗 -->
|
|
|
<renewalListDia :isShow.sync="isRenewalShow" :rowInfo="rowInfo"/>
|
|
|
+ <!-- 添加备注弹窗 -->
|
|
|
+ <addRemark :isShow.sync="isAddRemarkShow" @saveRemark="saveRemark" />
|
|
|
+ <!-- 历史备注弹窗 -->
|
|
|
+ <viewRemark :isShow.sync="isViewRemarkShow" :tableData="historyRemarkList" />
|
|
|
+ <!-- 确认不续约弹窗 -->
|
|
|
+ <confirmedNoRenewal :isShow.sync="isConfirmNoRenewalShow" :dataForm="confirmNoRenewalForm"
|
|
|
+ :noRenewalReasonList="noRenewalReasonList" @refreshReasonList="getNORenewalReasonList" @saveLabel="saveLabel" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -208,11 +249,15 @@ import { incrementTableColums } from './configdata.js'
|
|
|
import { dataMainInterface,customInterence } from '@/api/api.js'
|
|
|
import mPage from '@/components/mPage.vue'
|
|
|
import renewalListDia from './components/renewalListDia.vue'
|
|
|
+import addRemark from './components/noRenewalReasonDia/addRemark.vue'
|
|
|
+import viewRemark from './components/noRenewalReasonDia/viewRemark.vue'
|
|
|
+import confirmedNoRenewal from './components/noRenewalReasonDia/confirmedNoRenewal.vue'
|
|
|
+
|
|
|
var moment = require('moment');
|
|
|
moment().format();
|
|
|
export default {
|
|
|
name:'',
|
|
|
- components: {mPage,renewalListDia},
|
|
|
+ components: {mPage,renewalListDia,addRemark,viewRemark,confirmedNoRenewal},
|
|
|
computed: {
|
|
|
exportExcel() {
|
|
|
let baseUrl = process.env.API_ROOT + "/statistic_report/incremental_company_list";
|
|
@@ -234,6 +279,8 @@ export default {
|
|
|
DataType: this.filterObj.data_type == '新增试用客户' ? '新增试用' : this.filterObj.data_type,
|
|
|
Keyword:this.searchVal,
|
|
|
IsExport:true,
|
|
|
+ IsConfirm:this.filterObj.data_type=='未续约客户'?1:-1,
|
|
|
+ CompanyAscribeId:this.noRenewalReasonId
|
|
|
};
|
|
|
for (let key in obj) {
|
|
|
paramStr = `${paramStr}&${key}=${obj[key]}`;
|
|
@@ -252,6 +299,10 @@ export default {
|
|
|
ManageType() {
|
|
|
return localStorage.getItem('ManageType') || '';
|
|
|
},
|
|
|
+ //确认未续约权限
|
|
|
+ canConfirmNotRenewed(){
|
|
|
+ return ['admin','rai_admin'].includes(this.Role)
|
|
|
+ }
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -322,6 +373,21 @@ export default {
|
|
|
tabsActiveName:'试用',
|
|
|
NotRenewalNotTryOut:0,//冻结流失的人数
|
|
|
NotRenewalTryOut:0,//试用的人数
|
|
|
+ isNotRenewedConfirm:1,//未续约的是否已确认
|
|
|
+ noRenewalReasonList:[],
|
|
|
+ noRenewalReasonId:'',
|
|
|
+ selectItemRow:{},// 当前选中的row
|
|
|
+ // 添加备注
|
|
|
+ isAddRemarkShow:false,
|
|
|
+ //历史备注
|
|
|
+ isViewRemarkShow:false,
|
|
|
+ historyRemarkList:[],
|
|
|
+ //确认不续约
|
|
|
+ isConfirmNoRenewalShow:false,
|
|
|
+ confirmNoRenewalForm:{
|
|
|
+ reason:"",
|
|
|
+ detailReason:""
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
/* 页面跳转前记录参数 */
|
|
@@ -343,6 +409,11 @@ export default {
|
|
|
next()
|
|
|
},
|
|
|
methods: {
|
|
|
+ controlTableColumnShow(item){
|
|
|
+ return !item.dataType ||
|
|
|
+ (item.dataType === this.filterObj.data_type &&
|
|
|
+ (!item.notRenewedConfirm || item.notRenewedConfirm==this.isNotRenewedConfirm)) // 已确认和待确认
|
|
|
+ },
|
|
|
// 搜索
|
|
|
handleSearch(){
|
|
|
if(!this.searchVal){
|
|
@@ -380,6 +451,13 @@ export default {
|
|
|
//tabs 的点击事件
|
|
|
tabsHandler(item) {
|
|
|
this.tabsActiveName = item.value;
|
|
|
+ this.noRenewalReasonId=''
|
|
|
+ this.page_no = 1;
|
|
|
+ this.getTableData()
|
|
|
+ },
|
|
|
+ notRenewedConfirmChange(){
|
|
|
+ this.tabsActiveName = '试用'
|
|
|
+ this.noRenewalReasonId=''
|
|
|
this.page_no = 1;
|
|
|
this.getTableData()
|
|
|
},
|
|
@@ -403,7 +481,9 @@ export default {
|
|
|
EndDate: this.end_date,
|
|
|
StartDate: this.start_date,
|
|
|
DataType: this.filterObj.data_type == '新增试用客户' ? '新增试用' : this.filterObj.data_type,
|
|
|
- TryOutType:this.filterObj.data_type=='未续约客户'? this.tabsActiveName : '',
|
|
|
+ TryOutType:this.filterObj.data_type=='未续约客户' && this.isNotRenewedConfirm==1? this.tabsActiveName : '',
|
|
|
+ IsConfirm:this.filterObj.data_type=='未续约客户'?this.isNotRenewedConfirm:-1,
|
|
|
+ CompanyAscribeId:this.noRenewalReasonId
|
|
|
}
|
|
|
dataMainInterface.incrementalList(params).then(res => {
|
|
|
if(res.Ret === 200) {
|
|
@@ -450,6 +530,10 @@ export default {
|
|
|
/* 切换数据类型 */
|
|
|
toggleType(label) {
|
|
|
this.filterObj.data_type = label;
|
|
|
+ this.noRenewalReasonId=''
|
|
|
+ if(label == "未续约客户"){
|
|
|
+ this.getNORenewalReasonList()
|
|
|
+ }
|
|
|
this.tabsActiveName = '试用';
|
|
|
this.page_no = 1;
|
|
|
this.getTableData()
|
|
@@ -490,7 +574,13 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ getNORenewalReasonList(){
|
|
|
+ dataMainInterface.getAscribList().then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.noRenewalReasonList=res.Data.List||[]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 未续约说明更多按钮
|
|
|
renewalReasonMore(row){
|
|
|
this.rowInfo={
|
|
@@ -499,6 +589,71 @@ export default {
|
|
|
}
|
|
|
this.isRenewalShow=true
|
|
|
},
|
|
|
+ // 添加备注
|
|
|
+ addRemarkFun(row){
|
|
|
+ this.selectItemRow=row
|
|
|
+ this.isAddRemarkShow=true
|
|
|
+ },
|
|
|
+ // 添加备注 保存
|
|
|
+ saveRemark(remark){
|
|
|
+ // console.log(remark);
|
|
|
+ let params={
|
|
|
+ CompanyId:this.selectItemRow.CompanyId,
|
|
|
+ ProductId:this.selectItemRow.ProductId,
|
|
|
+ Content:remark
|
|
|
+ }
|
|
|
+ dataMainInterface.addNotRenewedRemark(params).then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.$message.success("添加成功")
|
|
|
+ this.getTableData()
|
|
|
+ this.isAddRemarkShow=false
|
|
|
+ this.selectItemRow={}
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 查看历史备注
|
|
|
+ viewHistoryRemarkFun(row){
|
|
|
+ dataMainInterface.getNotRenewedRemarkList({CompanyId:row.CompanyId,ProductId:row.ProductId})
|
|
|
+ .then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.historyRemarkList=res.Data.List || []
|
|
|
+ this.isViewRemarkShow=true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ confirmedNoRenewalFun(row){
|
|
|
+ this.confirmNoRenewalForm.reason = ""
|
|
|
+ this.confirmNoRenewalForm.detailReason = ""
|
|
|
+ this.selectItemRow = row
|
|
|
+ this.isConfirmNoRenewalShow=true
|
|
|
+ },
|
|
|
+ editReasonLabel(row){
|
|
|
+ dataMainInterface.infoNoRenewedAscribe({CompanyId:row.CompanyId,ProductId:row.ProductId})
|
|
|
+ .then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.confirmNoRenewalForm.reason = res.Data.Detail?res.Data.Detail.CompanyAscribeId||"":""
|
|
|
+ this.confirmNoRenewalForm.detailReason = res.Data.Detail?res.Data.Detail.Content||"":""
|
|
|
+ this.selectItemRow=row
|
|
|
+ this.isConfirmNoRenewalShow=true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ saveLabel(item){
|
|
|
+ let params={
|
|
|
+ CompanyId:this.selectItemRow.CompanyId,
|
|
|
+ ProductId:this.selectItemRow.ProductId,
|
|
|
+ CompanyAscribeId:item.CompanyAscribeId,
|
|
|
+ Content:item.Content
|
|
|
+ }
|
|
|
+ dataMainInterface.addNoRenewedAscribe(params).then(res=>{
|
|
|
+ if(res.Ret == 200){
|
|
|
+ this.$message.success("确认成功")
|
|
|
+ this.isConfirmNoRenewalShow=false
|
|
|
+ this.selectItemRow={}
|
|
|
+ this.getTableData()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {
|
|
@@ -517,6 +672,68 @@ export default {
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
-<style lang='scss'>
|
|
|
+<style lang='scss' scoped>
|
|
|
@import './index.scss';
|
|
|
+.tabs-box{
|
|
|
+ flex-direction: column;
|
|
|
+ .tabs-box-confirm{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ .center-line{
|
|
|
+ width: 1px;
|
|
|
+ height: 21px;
|
|
|
+ background-color: #333333;
|
|
|
+ margin: 0 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+.operation-button{
|
|
|
+ color:#409EFF;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 14px;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+.remark-row{
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ .remark-text{
|
|
|
+ width:18px ;
|
|
|
+ height: 18px;
|
|
|
+ margin-right: 8px;
|
|
|
+ font-size: 18px;
|
|
|
+ color: #409EFF;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+}
|
|
|
+.operation-row{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ .operation-button{
|
|
|
+ &:last-child{
|
|
|
+ margin-right:0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|
|
|
+<style lang="scss">
|
|
|
+#dataReport-container{
|
|
|
+ .tabs-box{
|
|
|
+ .el-radio-button{
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+ .el-radio-button .el-radio-button__inner{
|
|
|
+ border: none;
|
|
|
+ width: 120px;
|
|
|
+ height: 40px;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
</style>
|