Commit 2ba642ae by 前端

Merge branch 'xuyl_dev_v2.9.0' into 'v2.9.0'

更新v2.9.0代码

See merge request !145
2 parents 09dd9b75 7128de28
......@@ -33,11 +33,16 @@
<el-tooltip effect="dark" placement="top">
<div class="qiweiItem" slot="content">
<span class="qiweiItemNick">{{ item.nickName }}</span>
<span class="qiweiItemCrop" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName }}</span>
<span class="qiweiItemCrop"
:class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName
}}</span>
</div>
<div class="qiweiItem" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">
<div class="qiweiItem"
:class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">
<span class="qiweiItemNick">{{ item.nickName }}</span>
<span class="qiweiItemCrop" :class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName }}</span>
<span class="qiweiItemCrop"
:class="[item.type == 1 ? 'pure-green-text' : '', item.type == 2 ? 'pure-yello-text' : '']">@{{ item.corpName
}}</span>
</div>
</el-tooltip>
</div>
......@@ -45,7 +50,9 @@
</div>
<p>
<span>联系电话:</span>
<span class="ellipsis-1" v-if="leftPanelInfo.customerPhone || leftPanelInfo.status == -1">{{ leftPanelInfo.customerPhone }}</span>
<span class="ellipsis-1"
v-if="leftPanelInfo.customerPhone || leftPanelInfo.status == -1">{{ leftPanelInfo.customerPhone
}}</span>
<span
class="phone-fill"
v-else
......@@ -63,24 +70,28 @@
</p>
<p>
<span>性别:</span>
<span class="ellipsis-1">{{ leftPanelInfo.customerSex == 0 ? '未知' : leftPanelInfo.customerSex == 1 ? '男' : leftPanelInfo.customerSex == 2 ? '女' : '' }}</span>
<span
class="ellipsis-1">{{ leftPanelInfo.customerSex == 0 ? "未知" : leftPanelInfo.customerSex == 1 ? "男" : leftPanelInfo.customerSex == 2 ? "女" : ""
}}</span>
</p>
<p>
<span>企业简称:</span>
<span class="ellipsis-1">{{ leftPanelInfo.corpName || '待完善' }}</span>
<span class="ellipsis-1">{{ leftPanelInfo.corpName || "待完善" }}</span>
</p>
<p>
<span>职务:</span>
<span class="ellipsis-1">{{ leftPanelInfo.position || '待完善' }}</span>
<span class="ellipsis-1">{{ leftPanelInfo.position || "待完善" }}</span>
</p>
<p v-if="leftPanelInfo.type == 2">
<span>类型:</span>
<span class="ellipsis-1">{{ leftPanelInfo.type == 1 ? '微信用户' : leftPanelInfo.type == 2 ? '企微用户' : '' }}</span>
<span
class="ellipsis-1">{{ leftPanelInfo.type == 1 ? "微信用户" : leftPanelInfo.type == 2 ? "企微用户" : ""
}}</span>
</p>
<p>
<span>是否加入企微:</span>
<!-- 1-是,2-否 -->
<span>{{ leftPanelInfo.isJoin == 1 ? '是' : leftPanelInfo.isJoin == 0 ? '否' : '' }}</span>
<span>{{ leftPanelInfo.isJoin == 1 ? "是" : leftPanelInfo.isJoin == 0 ? "否" : "" }}</span>
</p>
<template v-if="isCgacar">
<p>
......@@ -97,7 +108,7 @@
<p>
<span>当前状态:</span>
<span>{{ leftPanelInfo.status == -1 ? '删除好友' : leftPanelInfo.status == 0 ? '正常' : '' }}</span>
<span>{{ leftPanelInfo.status == -1 ? "删除好友" : leftPanelInfo.status == 0 ? "正常" : "" }}</span>
</p>
<p>
......@@ -135,13 +146,15 @@
<span class="font-14 color-58">收起</span>
<i class="el-icon-arrow-up color-58"></i>
</div>
<div class="expande-button" @click="expandeClick(true, 'expande')" v-if="vehicleTableData.length > 1 && !expande">
<div class="expande-button" @click="expandeClick(true, 'expande')"
v-if="vehicleTableData.length > 1 && !expande">
<span class="font-14 color-58">更多车辆</span>
<i class="el-icon-arrow-down color-58"></i>
</div>
</div>
<layout-row class="layout-detail" :layoutData="vehicleTableData" :layoutParams="vehicleTableParams" :isHidden="expande"></layout-row>
<layout-row class="layout-detail" :layoutData="vehicleTableData" :layoutParams="vehicleTableParams"
:isHidden="expande"></layout-row>
<template v-if="deviceTableData.length > 0">
<div class="public-text">
<div class="public-text-info font-16 flex">
......@@ -152,31 +165,36 @@
<span class="font-14 color-58">收起</span>
<i class="el-icon-arrow-up color-58"></i>
</div>
<div class="expande-button" @click="expandeClick(true, 'deviceExpande')" v-if="deviceTableData.length > 1 && !deviceExpande">
<div class="expande-button" @click="expandeClick(true, 'deviceExpande')"
v-if="deviceTableData.length > 1 && !deviceExpande">
<span class="font-14 color-58">更多设备</span>
<i class="el-icon-arrow-down color-58"></i>
</div>
</div>
<layout-row class="layout-detail" :layoutData="deviceTableData" :layoutParams="deviceTableParams" :isHidden="deviceExpande"></layout-row>
<layout-row class="layout-detail" :layoutData="deviceTableData" :layoutParams="deviceTableParams"
:isHidden="deviceExpande"></layout-row>
</template>
<template v-if="guaranteeTableData.length > 0">
<div class="public-text">
<div class="public-text-info font-16 flex">
保单信息
<!-- 保单信息-->
{{isCgacar?'数字化权益':'售前权益'}}
<span class="font-14 color-58">{{ guaranteeTableData.length || 0 }}个</span>
</div>
<div class="expande-button" v-if="guaranteeExpande" @click="expandeClick(false, 'guaranteeExpande')">
<span class="font-14 color-58">收起</span>
<i class="el-icon-arrow-up color-58"></i>
</div>
<div class="expande-button" @click="expandeClick(true, 'guaranteeExpande')" v-if="guaranteeTableData.length > 1 && !guaranteeExpande">
<div class="expande-button" @click="expandeClick(true, 'guaranteeExpande')"
v-if="guaranteeTableData.length > 1 && !guaranteeExpande">
<span class="font-14 color-58">更多保单</span>
<i class="el-icon-arrow-down color-58"></i>
</div>
</div>
<layout-row class="layout-detail" :layoutData="guaranteeTableData" :layoutParams="guaranteeTableParams" :isHidden="guaranteeExpande"></layout-row>
<layout-row class="layout-detail" :layoutData="guaranteeTableData" :layoutParams="guaranteeTableParams"
:isHidden="guaranteeExpande"></layout-row>
</template>
<div class="public-text">
<div class="public-text-info font-16 flex">
......@@ -185,16 +203,18 @@
</div>
</div>
<!--2. 员工跟进表 -->
<GLTable :hasNum="false" class="table" :tableData="employTableList" :hasPage="false" :tableParams="employTableParams" :headerStyle="{ height: '54px' }"></GLTable>
<GLTable :hasNum="false" class="table" :tableData="employTableList" :hasPage="false"
:tableParams="employTableParams" :headerStyle="{ height: '54px' }"></GLTable>
<div class="public-text">
<div class="public-text-info font-16 flex">
所属群聊
<span class="font-14 color-58">{{ clientGroupTableList.length || 0 }}个</span>
</div>
</div>
<GLTable class="table" :hasNum="false" :tableData="clientGroupTableList" :hasPage="false" :tableParams="clientGroupTableParams" :headerStyle="{ height: '54px' }">
<GLTable class="table" :hasNum="false" :tableData="clientGroupTableList" :hasPage="false"
:tableParams="clientGroupTableParams" :headerStyle="{ height: '54px' }">
<span slot="groupName" slot-scope="scope" class="groupName">
<span>{{ scope.scope.groupName || '群聊(默认)' }}</span>
<span>{{ scope.scope.groupName || "群聊(默认)" }}</span>
</span>
<div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button type="text" @click="goDetail(scope.scope.id, scope.scope.groupName)">详情</el-button>
......@@ -209,22 +229,30 @@
<tip-panel class="mg2" panelMinHeight="45px" :panelContent="panelContent"></tip-panel>
<!-- v-if="userType == 2" -->
<el-button type="primary" class="addTagBtn" size="small" @click="btnClick('create')" v-if="userType == 2">设置标签</el-button>
<GLTable class="table" ref="clientTagsListRef" :hasNum="false" :noDataImg="url" noDataText="客户暂无已添加的标签" :tableData="clientTagsList" :hasPage="false" :tableParams="tagsParams" :headerStyle="{ height: '54px' }">
<el-button type="primary" class="addTagBtn" size="small" @click="btnClick('create')" v-if="userType == 2">
设置标签
</el-button>
<GLTable class="table" ref="clientTagsListRef" :hasNum="false" :noDataImg="url"
noDataText="客户暂无已添加的标签" :tableData="clientTagsList" :hasPage="false"
:tableParams="tagsParams" :headerStyle="{ height: '54px' }">
<span slot="labelGroupInfo" slot-scope="scope">
<span>{{ scope.scope.labelGroupInfo.labelGroupName }}</span>
</span>
<span slot="labelInfoList" slot-scope="scope">
<div id="allTagsWrap" class="allTagsWrap">
<span v-for="(item, index) in showTagArray(scope.scope.labelInfoList)" :key="index" class="ellipsis-1 tag-box-wrap">
<span v-for="(item, index) in showTagArray(scope.scope.labelInfoList)" :key="index"
class="ellipsis-1 tag-box-wrap">
<el-tooltip class="item" :content="item.labelName" placement="top">
<span>{{ item.labelName }}</span>
</el-tooltip>
</span>
<el-popover v-if="scope.scope.labelInfoList.length > 9" class="ellipsis-1 tag-box-wrap" placement="top" width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<el-popover v-if="scope.scope.labelInfoList.length > 9" class="ellipsis-1 tag-box-wrap" placement="top"
width="600" trigger="hover" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。">
<span slot="reference">...({{ scope.scope.labelInfoList.length }})</span>
<div class="entmicro-hover" style="height: 214px; overflow-y: auto">
<el-tag type="info" class="ellipsis-1" style="margin-right: 10px; margin-bottom: 10px; max-width: 200px" v-for="(i, sindex) in scope.scope.labelInfoList" :key="sindex" :disable-transitions="false">
<el-tag type="info" class="ellipsis-1"
style="margin-right: 10px; margin-bottom: 10px; max-width: 200px"
v-for="(i, sindex) in scope.scope.labelInfoList" :key="sindex" :disable-transitions="false">
<el-tooltip class="item" :content="i.labelName" placement="top">
<span>{{ i.labelName }}</span>
</el-tooltip>
......@@ -252,11 +280,12 @@
<el-button type="primary" size="small" @click="phoneConfirmDialog">确 定</el-button>
</span>
</GLDialog>
<GLDialog :title="tagsDialogTitle" :isDestroyClose="true" :btnLoading="sloading" :isShowThirdBtn="true" :isShowCloseBtn="true" @btnEvent="goNewTag" :visible.sync="tagsVisible" >
<GLDialog :title="tagsDialogTitle" :isDestroyClose="true" :btnLoading="sloading" :isShowThirdBtn="true"
:isShowCloseBtn="true" @btnEvent="goNewTag" :visible.sync="tagsVisible">
<div>
<p class="hint-text color-6">
<span class="color-3">说明:</span>
仅支持{{ '企业' | tagType }}标签
仅支持{{ "企业" | tagType }}标签
<span v-if="merchantModel == 1">和自店标签</span>
进行人工维护和设置
</p>
......@@ -269,7 +298,9 @@
<div class="label-name white-hide color-71 mt10">{{ labels.labelGroup.name }}:</div>
<div class="label-value flex">
<template v-for="(label, i) in labels.labelList">
<div :class="['label', 'color-3', 'white-hide', 'mt10', label.checked ? 'isChecked' : '']" :style="{ width: label.name.length > 10 ? '145px' : auto }" :key="label.id" @click="choose(index, ids, i)">
<div :class="['label', 'color-3', 'white-hide', 'mt10', label.checked ? 'isChecked' : '']"
:style="{ width: label.name.length > 10 ? '145px' : auto }" :key="label.id"
@click="choose(index, ids, i)">
<template v-if="label.name.length < 10">{{ label.name }}</template>
<el-tooltip class="item" :content="label.name" placement="top" v-else>
<span>{{ label.name }}</span>
......@@ -285,7 +316,7 @@
</template>
</div>
</div>
<span slot="footer" class="dialog-footer">
<span slot="footer" class="dialog-footer">
<el-button plain size="small" class="btn-three" @click="handleClose">取 消</el-button>
<el-button type="primary" size="small" @click="handleConfirm">确 定</el-button>
</span>
......@@ -294,26 +325,33 @@
</template>
<script>
import { getAllTagTree, getSingleClientTag, addSingleClientTag, getTableDetail, perfectCustomerPhone } from '@/api/modules/clientManage'
import tipPanel from '@/components/tipPanel/index.vue'
import url from '@/assets/clientDetail/noDataBox.png'
import {
getAllTagTree,
getSingleClientTag,
addSingleClientTag,
getTableDetail,
perfectCustomerPhone
} from "@/api/modules/clientManage";
import tipPanel from "@/components/tipPanel/index.vue";
import url from "@/assets/clientDetail/noDataBox.png";
export default {
name: 'clientDetail',
name: "clientDetail",
components: {
tipPanel
},
data() {
return {
contactPhone: '',
contactPhone: "",
isShowBaseInfo: true,
isShowTooltip: false,
remark: '',
remark: "",
sloading: false,
loading: false,
expande: false, //车辆
deviceExpande: false, //设备
guaranteeExpande: false, //保单
panelContent: this.$globalState.session.merchantModel == 1 ? '说明:标签信息包含跟进员工标记的集团标签和自店标签,以及通过大数据算法生成的系统标签' : '说明:标签信息包含跟进员工标记的企业标签和自店标签,以及通过大数据算法生成的系统标签',
panelContent: this.$globalState.session.merchantModel == 1 ? "说明:标签信息包含跟进员工标记的集团标签和自店标签,以及通过大数据算法生成的系统标签" : "说明:标签信息包含跟进员工标记的企业标签和自店标签,以及通过大数据算法生成的系统标签",
url: url,
leftPanelInfo: {},
labelIdList: [], //存放用户被标记标签的id
......@@ -321,180 +359,180 @@ export default {
vehicleTableData: [],
vehicleTableParams: [
{
label: '车架号:',
prop: 'standNo',
addHtml: 'standNo'
label: "车架号:",
prop: "standNo",
addHtml: "standNo"
},
{
label: '车牌号:',
prop: 'vehicleNo'
label: "车牌号:",
prop: "vehicleNo"
},
{
label: '发动机号:',
prop: 'engineNumber'
label: "发动机号:",
prop: "engineNumber"
},
{
label: '车辆品牌:',
prop: 'vehicleBrand'
label: "车辆品牌:",
prop: "vehicleBrand"
},
{
label: '车系:',
prop: 'vehicleTrain'
label: "车系:",
prop: "vehicleTrain"
},
{
label: '车型:',
prop: 'vehicleType'
label: "车型:",
prop: "vehicleType"
},
{
label: '车身颜色:',
prop: 'vehicleColor'
label: "车身颜色:",
prop: "vehicleColor"
},
{
label: '购车价格:',
prop: 'vehiclePrice'
label: "购车价格:",
prop: "vehiclePrice"
},
{
label: '购车时间:',
prop: 'buyTime'
label: "购车时间:",
prop: "buyTime"
},
{
label: '最近保养时间:',
prop: 'maintRecTime'
label: "最近保养时间:",
prop: "maintRecTime"
},
{
label: '保险开始时间:',
prop: 'insBgnTime'
label: "车险起保时间:",
prop: "insBgnTime"
},
{
label: '保险到期时间:',
prop: 'insEndTime'
label: "车险终保时间:",
prop: "insEndTime"
}
],
deviceTableData: [],
deviceTableParams: [
{
label: '设备号(SN/IMEI):',
prop: 'sn',
addHtml: 'standNo'
label: "设备号(SN/IMEI):",
prop: "sn",
addHtml: "standNo"
},
{
label: '设备流量卡(ICCID):',
prop: 'iccId'
label: "设备流量卡(ICCID):",
prop: "iccId"
},
{
label: '设备类型:',
prop: 'deviceType'
label: "设备类型:",
prop: "deviceType"
},
// {
// label: '设备型号:',
// prop: 'deviceModel'
// },
// {
// label: '验证码:',
// prop: 'verificationCode'
// },
// {
// label: '批次号:',
// prop: 'batchNo'
// },
{
label: '设备型号:',
prop: 'deviceModel'
},
{
label: '验证码:',
prop: 'verificationCode'
},
{
label: '批次号:',
prop: 'batchNo'
},
{
label: '绑定车辆(车架号):',
prop: 'standNo'
},
{
label: '设备激活时间:',
prop: 'deviceActiveTime'
label: "绑定车辆(车架号):",
prop: "standNo"
}
// {
// label: '设备激活时间:',
// prop: 'deviceActiveTime'
// }
],
guaranteeTableData: [], //保单
guaranteeTableParams: [
{
label: '保单号:',
prop: 'attInsureOrder',
addHtml: 'standNo'
label: "保单号:",
prop: "attInsureOrder",
addHtml: "standNo"
},
{
label: '产品名称:',
prop: 'attProductName'
label: "产品名称:",
prop: "attProductName"
},
{
label: '服务期限:',
prop: 'attServicePeriod'
label: "服务期限:",
prop: "attServicePeriod"
},
{
label: '服务公司:',
prop: 'attServiceCompany'
label: "服务公司:",
prop: "attServiceCompany"
},
{
label: '保险生效时间:',
prop: 'attInsureStartTime'
label: "保险生效时间:",
prop: "attInsureStartTime"
},
{
label: '保险到期时间:',
prop: 'attInsureEndTime'
label: "保险到期时间:",
prop: "attInsureEndTime"
},
{
label: '保险提单时间:',
prop: 'attInsureSubmitTime'
label: "保险提单时间:",
prop: "attInsureSubmitTime"
},
{
label: '绑定车辆:',
prop: 'standNo'
label: "绑定车辆:",
prop: "standNo"
}
],
//员工跟进
employTableParams: {
listName: 'staffFollows',
listName: "staffFollows",
tableOption: false,
tableColumns: [
{
label: '跟进员工',
prop: 'staffName',
align: 'left',
label: "跟进员工",
prop: "staffName",
align: "left",
minWidth: 120
},
{
label: '所属部门',
prop: 'departmentName',
align: 'left',
label: "所属部门",
prop: "departmentName",
align: "left",
line: 1,
width: 120
},
{
label: '添加时间',
prop: 'addTime',
label: "添加时间",
prop: "addTime",
minWidth: 180,
align: 'left'
align: "left"
},
{
label: '来源',
prop: 'addWayName',
label: "来源",
prop: "addWayName",
width: 90
},
{
label: '添加类型',
prop: 'addType',
addHtml: 'addType',
label: "添加类型",
prop: "addType",
addHtml: "addType",
width: 170,
align: 'left'
align: "left"
},
{
label: '备注手机号',
prop: 'remarkMobiles',
label: "备注手机号",
prop: "remarkMobiles",
minWidth: 140,
align: 'left'
align: "left"
},
{
label: '备注',
prop: 'remark',
align: 'left',
label: "备注",
prop: "remark",
align: "left",
line: 1,
width: 230
},
{
label: '描述',
prop: 'description',
align: 'left',
label: "描述",
prop: "description",
align: "left",
line: 1,
width: 150
}
......@@ -503,46 +541,46 @@ export default {
employTableList: [],
clientGroupTableList: [],
clientGroupTableParams: {
listName: 'customerBases',
listName: "customerBases",
tableColumns: [
{
label: '群聊名称',
prop: 'groupName',
addHtml: 'groupName',
align: 'left',
label: "群聊名称",
prop: "groupName",
addHtml: "groupName",
align: "left",
width: 260
},
{
label: '群主',
prop: 'groupHostName',
align: 'left',
label: "群主",
prop: "groupHostName",
align: "left",
line: 1,
width: 200
},
{
label: '客户数',
prop: 'membersNumber',
align: 'left',
label: "客户数",
prop: "membersNumber",
align: "left",
width: 180
},
{
label: '本群昵称',
prop: 'groupNickName',
align: 'left',
label: "本群昵称",
prop: "groupNickName",
align: "left",
line: 1,
width: 200
},
{
label: '入群时间',
prop: 'joinTime',
align: 'left',
label: "入群时间",
prop: "joinTime",
align: "left",
width: 200
},
{
label: '操作',
prop: 'optionBtns',
addHtml: 'optionBtns',
fixed: 'right'
label: "操作",
prop: "optionBtns",
addHtml: "optionBtns",
fixed: "right"
}
]
// tableOption:{
......@@ -554,33 +592,33 @@ export default {
clientTagsList: [],
nickNameList: [],
tagsParams: {
listName: 'labelInfos',
listName: "labelInfos",
tableOption: false,
tableColumns: [
{
label: '标签组',
prop: 'labelGroupInfo',
addHtml: 'labelGroupInfo',
width: '230'
label: "标签组",
prop: "labelGroupInfo",
addHtml: "labelGroupInfo",
width: "230"
},
{
label: '标签组类型',
prop: 'labelGroupInfo',
label: "标签组类型",
prop: "labelGroupInfo",
formatter: cellValue => {
return cellValue.labelGroupInfo.labelGroupType == '企业标签' && this.$globalState.session.merchantModel == 1 ? '集团标签' : cellValue.labelGroupInfo.labelGroupType
return cellValue.labelGroupInfo.labelGroupType == "企业标签" && this.$globalState.session.merchantModel == 1 ? "集团标签" : cellValue.labelGroupInfo.labelGroupType;
},
width: '160'
width: "160"
},
{
label: '已打标签',
prop: 'labelInfoList',
addHtml: 'labelInfoList',
align: 'left'
label: "已打标签",
prop: "labelInfoList",
addHtml: "labelInfoList",
align: "left"
}
]
},
//弹窗数据
tagsDialogTitle: '设置标签',
tagsDialogTitle: "设置标签",
tagsVisible: false,
phoneVisible: false,
companyTagsList: [],
......@@ -596,22 +634,22 @@ export default {
userid: 0, //小龙需要用户id
staffId: 0,
isCgacar: false
}
};
},
created() {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantId = this.$globalState.session.merchantId
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
this.userType = this.$globalState.session.userType
this.merchantId = this.$globalState.session.merchantId;
this.merchantModel = this.$globalState.session.merchantModel;
this.accountLevel = this.$globalState.session.accountLevel;
this.userType = this.$globalState.session.userType;
}
if (location.host.includes('cgacar')) {
this.isCgacar = true
if (location.host.includes("cgacar")) {
this.isCgacar = true;
}
this.id = this.$route.query.id ? this.$route.query.id : ''
this.getPageDetail()
this.id = this.$route.query.id ? this.$route.query.id : "";
this.getPageDetail();
//舍弃调用小龙的获取单用户标签的接口
// this.getSingleClientTag(this.$route.query.id, this.merchantId)
},
......@@ -622,40 +660,40 @@ export default {
// } else {
// return val.length
// }
if (val && JSON.stringify(val[0]) === '{}') {
return 0
if (val && JSON.stringify(val[0]) === "{}") {
return 0;
} else {
return val.length
return val.length;
}
}
},
methods: {
// 切换基本信息的显示
switchBaseInfo() {
this.isShowBaseInfo = !this.isShowBaseInfo
this.isShowBaseInfo = !this.isShowBaseInfo;
},
expandeClick(value, data) {
this[data] = value
this[data] = value;
},
closePanel() {
this.isFirstShow = false
this.isFirstShow = false;
},
tabClick(index) {
this.currentIndex = index
this.currentIndex = index;
this.$nextTick(() => {
if (this.currentIndex == 2 && this.clientTagsList.length <= 0) {
this.$refs.clientTagsListRef.setTableHeightFun()
this.$refs.clientTagsListRef.setTableHeightFun();
// this.$refs.clientTagsListRef.tableHeightValues =
}
})
});
},
showTagArray(list) {
if (list.length == 0) {
return []
return [];
}
return list.slice(0, 9)
return list.slice(0, 9);
},
/* *
用途:js中字符串超长作固定长度加省略号(...)处理
......@@ -665,92 +703,92 @@ export default {
*/
myStandNo(standNo) {
if (!standNo) {
return ''
return "";
}
return standNo.substring(standNo.length - 6)
return standNo.substring(standNo.length - 6);
},
beautySub(value) {
if (value && value.length >= 6) {
return value.substring(0, 5) + '...'
return value.substring(0, 5) + "...";
} else {
return value
return value;
}
},
addTypeToLable(num) {
return num === 0 ? '成员主动添加' : num === 1 ? '客户主动添加' : num === 2 ? '成员共享/管理员分配' : ''
return num === 0 ? "成员主动添加" : num === 1 ? "客户主动添加" : num === 2 ? "成员共享/管理员分配" : "";
},
goDetail(id, name) {
var newname = name || '群聊(默认)'
var newname = name || "群聊(默认)";
this.$router.push({
path: '/clientGroupManage/clientGroupDetail',
path: "/clientGroupManage/clientGroupDetail",
query: {
id: id,
groupName: newname
}
})
});
},
//oneId,merchantId,仅为测试用
getSingleClientTag(oneId = 14120314541863, merchantId = 10001001) {
let param = {
'req.oneId': oneId,
'req.merchantIdsStr': merchantId,
'req.edition': this.merchantModel
}
"req.oneId": oneId,
"req.merchantIdsStr": merchantId,
"req.edition": this.merchantModel
};
getSingleClientTag(param)
.then(res => {
if (res.code == 0) {
if (!res.userLabelUnitList) {
return
return;
}
let filterArr = []
let filterArr = [];
res.userLabelUnitList.forEach(item => {
filterArr.push(...item.labelInfoList)
})
filterArr.push(...item.labelInfoList);
});
this.tagsList = filterArr
this.labelIdList = filterArr.map(item => item.labelId)
this.tagsList = filterArr;
this.labelIdList = filterArr.map(item => item.labelId);
//
} else {
this.$message.error(res.message)
this.$message.error(res.message);
}
})
.catch(err => {
console.error(err, '捕获错误')
})
console.error(err, "捕获错误");
});
},
async getPageDetail(id = this.$route.query.id) {
this.loading = true
const res = await getTableDetail({ oneId: id })
this.loading = false
this.loading = true;
const res = await getTableDetail({ oneId: id });
this.loading = false;
if (!res) {
return false
return false;
}
this.userid = res.userid
this.staffId = res.staffId
this.leftPanelInfo = res.info
this.vehicleTableData = res.vehicleInfoList || [{}]
this.deviceTableData = res.deviceInfoList || []
this.guaranteeTableData = res.insureInfoList || [] //保单
this.employTableList = res.staffFollows || []
this.clientGroupTableList = res.customerBases || []
this.tagsList = res.labels || []
this.labelIdList = this.handleLabelId(res.labelInfos)
this.clientTagsList = res.labelInfos || []
this.nickNameList = res.nickNameList || []
this.userid = res.userid;
this.staffId = res.staffId;
this.leftPanelInfo = res.info;
this.vehicleTableData = res.vehicleInfoList || [{}];
this.deviceTableData = res.deviceInfoList || [];
this.guaranteeTableData = res.insureInfoList || []; //保单
this.employTableList = res.staffFollows || [];
this.clientGroupTableList = res.customerBases || [];
this.tagsList = res.labels || [];
this.labelIdList = this.handleLabelId(res.labelInfos);
this.clientTagsList = res.labelInfos || [];
this.nickNameList = res.nickNameList || [];
},
handleLabelId(data) {
let array = []
let array = [];
data &&
data.forEach(label => {
label.labelInfoList.forEach(info => {
array.push(info.labelId)
})
})
return array
data.forEach(label => {
label.labelInfoList.forEach(info => {
array.push(info.labelId);
});
});
return array;
},
goNewTag() {
this.$router.push({ path: '/tagsManage/index' })
this.$router.push({ path: "/tagsManage/index" });
},
// goBack() {
// this.$router.go(-1)
......@@ -758,135 +796,140 @@ export default {
//点击添加按钮
btnClick(pType, scope) {
switch (pType) {
case 'create':
this.tagsDialogTitle = '设置标签'
this.getAllTags()
case "create":
this.tagsDialogTitle = "设置标签";
this.getAllTags();
// this.handleClose();
break
case 'edit':
this.tagsDialogTitle = '编辑标签'
break;
case "edit":
this.tagsDialogTitle = "编辑标签";
//调编辑的接口
}
},
getAllTags() {
getAllTagTree({ 'labelTreeReq.shopId': this.merchantId, 'labelTreeReq.edition': this.merchantModel, 'labelTreeReq.pageNum': 1, 'labelTreeReq.pageSize': 3000 })
getAllTagTree({
"labelTreeReq.shopId": this.merchantId,
"labelTreeReq.edition": this.merchantModel,
"labelTreeReq.pageNum": 1,
"labelTreeReq.pageSize": 3000
})
.then(res => {
if (res.code == 0) {
let allTagsList = [
{
labelType: '',
labelType: "",
children: []
},
{
labelType: '',
labelType: "",
children: []
}
]
];
res.data.labelTreeRets.forEach(labels => {
labels.labelList.forEach(ele => {
ele.checked = false
ele.original = false
ele.checked = false;
ele.original = false;
this.labelIdList.forEach(id => {
if (id == ele.id) {
ele.checked = true
ele.old = 1
ele.checked = true;
ele.old = 1;
}
})
})
if (labels.labelType == '企业标签') {
allTagsList[0].labelType = this.$globalState.session.merchantModel == 1 ? '集团标签' : '企业标签'
allTagsList[0].children.push(labels)
} else if (labels.labelType == '自店标签') {
allTagsList[1].labelType = '自店标签'
allTagsList[1].children.push(labels)
});
});
if (labels.labelType == "企业标签") {
allTagsList[0].labelType = this.$globalState.session.merchantModel == 1 ? "集团标签" : "企业标签";
allTagsList[0].children.push(labels);
} else if (labels.labelType == "自店标签") {
allTagsList[1].labelType = "自店标签";
allTagsList[1].children.push(labels);
}
})
});
this.allTagsList = allTagsList
this.allTagsList = allTagsList;
//
} else {
this.$message.error(res.message)
this.$message.error(res.message);
}
})
.catch(err => {
console.error(err, '捕获错误')
})
this.handleClose()
console.error(err, "捕获错误");
});
this.handleClose();
},
phoneConfirmDialog() {
if (!this.contactPhone) {
this.$message.error('请输入联系号码')
return
this.$message.error("请输入联系号码");
return;
}
if (!/^1[3456789]\d{9}$/.test(this.contactPhone)) {
this.$message.error('联系电话不符合要求,请重新输入!')
return
this.$message.error("联系电话不符合要求,请重新输入!");
return;
}
const userIdList = this.nickNameList.map(item => item.userId)
const userIdList = this.nickNameList.map(item => item.userId);
let param = {
pageSize: 1,
pageNum: 1,
customerPhone: this.contactPhone,
userIdList
}
this.loading = true
};
this.loading = true;
perfectCustomerPhone(param).then(res => {
this.loading = false
this.loading = false;
if (res) {
this.getPageDetail(res)
this.$message.success('设置成功')
this.getPageDetail(res);
this.$message.success("设置成功");
}
})
this.phoneVisible = false
});
this.phoneVisible = false;
},
handleConfirm() {
this.sloading = true
let labelIdAddList = [] // 新增的标签
let labelIdDelList = [] //取消的标签
this.sloading = true;
let labelIdAddList = []; // 新增的标签
let labelIdDelList = []; //取消的标签
this.allTagsList.forEach(labels => {
labels.children.forEach(ele => {
ele.labelList.forEach(tag => {
if (tag.old == '1' && !tag.checked) {
labelIdDelList.push(tag.id)
if (tag.old == "1" && !tag.checked) {
labelIdDelList.push(tag.id);
}
if (!tag.old && tag.checked) {
labelIdAddList.push(tag.id)
labelIdAddList.push(tag.id);
}
})
})
})
const userIdList = this.nickNameList.map(item => item.userId)
});
});
});
const userIdList = this.nickNameList.map(item => item.userId);
let param = {
'req.OneId': this.id,
'req.merchantId': this.merchantId,
'req.uuId': this.userid,
'req.staffId': this.staffId,
'req.labelIdAddList': labelIdAddList,
'req.labelIdDelList': labelIdDelList,
'req.userIdList': userIdList
}
"req.OneId": this.id,
"req.merchantId": this.merchantId,
"req.uuId": this.userid,
"req.staffId": this.staffId,
"req.labelIdAddList": labelIdAddList,
"req.labelIdDelList": labelIdDelList,
"req.userIdList": userIdList
};
addSingleClientTag(param)
.then(res => {
if (res.data.code == 0) {
this.sloading = false
this.$message.success('设置成功')
this.handleClose()
this.sloading = false;
this.$message.success("设置成功");
this.handleClose();
// this.getSingleClientTag(this.id, this.merchantId)
this.getPageDetail() //刷新当前页面
this.getPageDetail(); //刷新当前页面
} else {
this.sloading = false
this.$message.error(res.data.message)
this.sloading = false;
this.$message.error(res.data.message);
}
})
.catch(err => {
this.sloading = false
console.error(err, '错误捕获')
this.sloading = false;
console.error(err, "错误捕获");
})
.finally(() => {
this.sloading = false
})
this.sloading = false;
});
},
handleClose() {
// if (this.tagsVisible) {
......@@ -894,55 +937,58 @@ export default {
// this.ownShopTagsList = []
// }
//
this.tagsVisible = !this.tagsVisible
this.allTagsList = []
this.tagsVisible = !this.tagsVisible;
this.allTagsList = [];
},
checkNewTag(checked, j, arr, original = false) {
//打开弹窗就是选中的,不许去选中,不是一开始就选中的,可以去选中
if (checked && original) {
return false
return false;
}
arr.forEach((item, index) => {
if (index == j) {
item.checked = !item.checked
item.checked = !item.checked;
}
})
let _arr = [] //筛选出只有checked:true的数组(包含了标签组对象和labelList数组)
});
let _arr = []; //筛选出只有checked:true的数组(包含了标签组对象和labelList数组)
_arr = this.allTagsList
.map(item => {
return {
...item,
labelList: item.labelList.filter(e => {
if (e.checked && !e.original) {
return e
return e;
}
})
}
};
})
.filter(ele => {
if (ele.labelList.length) {
return ele
return ele;
}
})
});
this.submitTagsList = _arr
this.submitTagsList = _arr;
},
choose(index1, index2, index3) {
this.allTagsList[index1].children[index2].labelList[index3].checked = !this.allTagsList[index1].children[index2].labelList[index3].checked
this.allTagsList[index1].children[index2].labelList[index3].checked = !this.allTagsList[index1].children[index2].labelList[index3].checked;
}
}
}
};
</script>
<style lang="scss" scoped>
@import '@/styles/variables.scss';
@import '@/styles/resetelement.scss';
.pure-green-text {
color: #61cc43;
}
.pure-yello-text {
color: #fb8f28;
}
.phone-fill {
font-size: 14px;
font-weight: 400;
......@@ -951,26 +997,32 @@ export default {
text-decoration: underline;
cursor: pointer;
}
.dialog-form {
display: flex;
align-items: center;
padding: 30px;
label {
width: 100px;
}
}
.newStyle {
display: flex;
font-size: 14px;
margin: 20px 0;
.nameListItem {
display: flex;
flex-direction: column;
.qiweiItem {
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.qiweiItemNick {
height: 20px;
font-size: 14px;
......@@ -979,6 +1031,7 @@ export default {
line-height: 20px;
font-weight: 400;
}
.qiweiItemCrop {
margin-left: 2px;
height: 20px;
......@@ -1007,20 +1060,23 @@ export default {
// min-width: 98px;
}
}
.overHidden {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.scrm-sub-client-container {
.container {
display: flex;
width: 100%;
margin-top: 20px;
min-height: calc(100vh - 194px);
overflow-y: auto;
margin-bottom: 78px;
.leftWrap {
width: 275px;
min-height: calc(100vh - 170px);
......@@ -1029,22 +1085,28 @@ export default {
// padding: 0 20px;
box-sizing: border-box;
text-align: center;
.customerID {
font-size: 14px;
}
.leftWrapTop {
.leftWrapBottom {
text-align: left;
}
padding: 0 20px;
.baseInfo {
padding-top: 5px;
display: flex;
justify-content: space-between;
span {
font-size: 16px;
font-weight: 600;
}
.iconStyle {
width: 16px;
height: 16px;
......@@ -1052,9 +1114,11 @@ export default {
}
}
}
.avatorStyle {
padding-bottom: 5px;
}
.avator {
margin: 0 auto;
margin-top: 40px;
......@@ -1070,6 +1134,7 @@ export default {
height: 100%;
}
}
p {
position: relative;
margin-top: 20px;
......@@ -1085,6 +1150,7 @@ export default {
min-width: 98px;
text-align: right;
}
span:nth-child(2) {
display: inline-block;
height: 20px;
......@@ -1096,6 +1162,7 @@ export default {
}
}
}
.rightWrap {
height: auto;
margin-left: 10px;
......@@ -1111,6 +1178,7 @@ export default {
top: 0;
display: flex;
background-color: $bgColor;
.tabItemText {
display: inline-block;
height: 40px;
......@@ -1125,10 +1193,12 @@ export default {
&:first-child {
border-left: 0;
}
font-weight: 400;
font-size: 14px;
color: #37383a;
}
.activeItemText {
border-radius: 4px 4px 0 0;
color: $btnBlue;
......@@ -1137,26 +1207,32 @@ export default {
border-bottom: 0 !important;
}
}
.addTagBtn {
margin-bottom: 10px;
margin-left: 20px;
}
// 处理客户标签的样式
.clientTagsWrap {
/deep/ .el-table:before {
background-color: #fff !important;
}
/deep/ .el-table__empty-block {
height: auto;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
/deep/ .glsx-table .emptyBg .noDataImg {
margin-top: 0;
}
.allTagsWrap {
position: relative;
.tag-box-wrap {
display: inline-block;
......@@ -1180,6 +1256,7 @@ export default {
}
}
}
.showOverTooltip {
display: -webkit-box;
text-overflow: ellipsis;
......@@ -1193,17 +1270,21 @@ export default {
height: 20px;
line-height: 20px;
margin-bottom: 10px;
&:not(:first-child) {
margin-top: 40px;
}
span {
vertical-align: middle;
}
span:first-child {
font-size: 18px;
font-weight: 400;
color: #333333;
}
span:nth-child(2) {
margin-left: 6px;
font-size: 14px;
......@@ -1213,6 +1294,7 @@ export default {
line-height: 20px;
}
}
.tagsWrap {
min-height: 74px;
border: 1px solid #e8e8ea;
......@@ -1220,6 +1302,7 @@ export default {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
.tag {
display: inline-block;
margin-top: 22px;
......@@ -1240,12 +1323,14 @@ export default {
// text-overflow: ellipsis;
max-width: 178px;
}
.addTag {
width: 68px;
height: 26px;
color: #fff;
background: $btnBlue;
border-radius: 4px;
&:hover {
cursor: pointer;
}
......@@ -1253,6 +1338,7 @@ export default {
}
}
}
.footer-panel {
position: fixed;
bottom: 0px;
......@@ -1262,6 +1348,7 @@ export default {
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
z-index: 999;
div {
display: inline-block;
position: relative;
......@@ -1271,39 +1358,47 @@ export default {
margin-left: -110px;
}
}
.tags {
/deep/.app-dialog {
/deep/ .app-dialog {
.container {
padding: 32px 74px;
}
}
.hint-text {
font-size: 12px;
font-weight: 400;
// color: #666;
line-height: 18px;
}
.mg10 {
margin-left: 38px;
}
.mt10 {
margin-top: 10px;
}
.labels-wrap {
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 20px;
margin-top: 20px;
.label-group-name {
margin-bottom: 2px;
font-weight: 600;
}
.labels {
.label-name {
box-sizing: border-box;
font-weight: 400;
}
.label {
height: 26px;
background: #fafbfe;
......@@ -1317,8 +1412,10 @@ export default {
box-sizing: border-box;
cursor: pointer;
}
.isChecked {
border: 1px solid #5850ff !important;
.select-icon {
width: 16px;
height: 16px;
......@@ -1330,8 +1427,10 @@ export default {
}
}
}
.general-wrap {
margin: 0 0 20px 0;
.public-text {
width: 100%;
height: 58px;
......@@ -1341,38 +1440,47 @@ export default {
box-sizing: border-box;
position: relative;
margin-bottom: 20px;
&-info {
font-size: 16px;
font-weight: 500;
color: #333333;
span {
margin-left: 8px;
}
}
.expande-button {
position: absolute;
right: 20px;
top: 0;
.el-icon-arrow-down {
font-size: 10px;
margin-left: 7px;
}
.el-icon-arrow-up {
font-size: 10px;
margin-left: 7px;
}
}
}
.layout-detail {
margin: 0 20px;
}
.table {
margin-bottom: 10px;
padding: 0 20px;
}
}
.table {
padding: 0 20px;
.groupName {
white-space: nowrap;
}
......
......@@ -12,10 +12,11 @@
<GLButton size="small" @click="handleExport" fn="导出">导出</GLButton>
</div>
<GLTable @setTableFinishFun="setTableFinishFun" v-if="isReload" ref="clientManage" :hasNum="true" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :searchForm="searchFormTable" :noDataImg="url" :pageConf="pageConf" :tableParams="tableParams">
<span slot="customerName" slot-scope="scope">
<span slot="customerName" slot-scope="scope">
<GLFull :labelWidth="70" :identification="`node_${scope.scope.id}`">{{ scope.scope.customerName ? scope.scope.customerName : '--' }}</GLFull>
</span>
<span slot="customerSex" slot-scope="scope">
<!-- <span slot="customerSex" slot-scope="scope" >-->
<span slot="customerSex" slot-scope="scope" >
<span>{{ scope.scope.customerSex == 0 ? '未知' : scope.scope.customerSex == 1 ? '男' : scope.scope.customerSex == 2 ? '女' : '' }}</span>
</span>
<!-- 企微名称 -->
......@@ -236,12 +237,12 @@ export default {
// mutiSelectUniqueKey: 'id',
tableColumns: [
{
label: '客户ID',
prop: 'oneId',
width: 290,
line: 1
},
// {
// label: '客户ID',
// prop: 'oneId',
// width: 290,
// line: 1
// },
{
label: '客户名称',
prop: 'customerName',
......@@ -443,7 +444,7 @@ export default {
setTableHeightEvent() {
this.$refs.clientManage.setTableHeightFun()
},
setTableFinishFun(content) {
setTableFinishFun() {
//关闭默认时间30天再刷新,showDefaultTime也要设置false
// if (!this.flushTime) {
// this.flushTime = true
......@@ -457,7 +458,7 @@ export default {
this.$refs.clientManage.data.length ? (this.$refs.clientManage.tableHeightValues = '') : this.$refs.clientManage.setTableHeightFun()
},
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
let params = JSON.parse(JSON.stringify(this.searchForm))
if (params.daterange) {
params.beginTime = this.searchForm.daterange[0]
params.endTime = this.searchForm.daterange[1]
......@@ -487,14 +488,13 @@ export default {
// resolve()
// })
return new Promise(async (resolve, reject) => {
return new Promise(async (resolve) => {
if (Object.keys(this.$route.query).length && this.queryFlag == 0) {
const res = JSON.parse(window.localStorage.getItem('sourceList'))
let add_way = this.$route.query.addWay || ''
let isJoinVal = this.$route.query.isJoin || null
let addWayObj = res.find(i => i.label === add_way)
let addWayVal = addWayObj.value
this.searchForm.addWay = addWayVal
this.searchForm.addWay = addWayObj.value
this.searchForm.isJoin = isJoinVal === null ? null : Number(isJoinVal)
setTimeout(() => {
this.$refs.combiForm.expandFn()
......@@ -568,7 +568,7 @@ export default {
},
//导出
handleExport() {
var params = this.getParams()
let params = this.getParams()
clientManageExportApi(params).then(res => {
this.$Utils.exportFn(res)
})
......@@ -675,8 +675,6 @@ export default {
}
}
padding: 20px 20px 30px;
// min-width: 1300px;
background-color: #fff;
.el-button + .el-button {
margin-left: 10px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!