|
|
@@ -6,7 +6,7 @@
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
<meta name="viewport"
|
|
|
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no, viewport-fit=cover" />
|
|
|
- <title>微分机器人</title>
|
|
|
+ <title>客户详情</title>
|
|
|
<!--引入 element-ui 的样式,-->
|
|
|
<link rel="stylesheet"
|
|
|
href="https://wl-1306604067.cos.ap-guangzhou.myqcloud.com/production/ct/103548289110001/1742018383195/element-ui.css">
|
|
|
@@ -293,6 +293,17 @@
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+ .biz_code {
|
|
|
+ height: 21px;
|
|
|
+ font-weight: 400;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #136DFB;
|
|
|
+ line-height: 17px;
|
|
|
+ padding: 2px 6px;
|
|
|
+ border-radius: 5px;
|
|
|
+ border: 1px solid #136DFB;
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
.item_tip {
|
|
|
font-weight: 400;
|
|
|
font-size: 12px;
|
|
|
@@ -398,7 +409,11 @@
|
|
|
.prize_form .el-textarea__inner:focus {
|
|
|
border: 1px solid #1677FF;
|
|
|
}
|
|
|
-
|
|
|
+ .add-icon {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin-left: 5px;
|
|
|
+ }
|
|
|
.el-radio__input.is-checked .el-radio__inner {
|
|
|
border-color: #1677FF;
|
|
|
background: #1677FF;
|
|
|
@@ -454,8 +469,11 @@
|
|
|
</div>
|
|
|
<div class="basic_msg_item" style="width: 50%;">
|
|
|
<span class="basic_msg_data">手机:</span>
|
|
|
- <span>{{clientData.phone}}</span>
|
|
|
- <img src="./img/edit.png" alt="" @click="handleEdit('手机', clientData.phone, 'phone')">
|
|
|
+ <div class="phone_list">
|
|
|
+ <div v-for="(item, index) in clientData.phoneList" :key="index">{{ item
|
|
|
+ }}</div>
|
|
|
+ </div>
|
|
|
+ <img src="./img/edit.png" alt="" @click="handleEdit('手机号', clientData.phoneList)">
|
|
|
</div>
|
|
|
<div class="basic_msg_item" style="width: 50%;">
|
|
|
<span class="basic_msg_data">省市:</span>
|
|
|
@@ -466,18 +484,17 @@
|
|
|
<span>{{clientData.intenModel}}</span>
|
|
|
</div>
|
|
|
<div class="basic_msg_item" style="width: 50%;">
|
|
|
- <span class="basic_msg_data">已购车型:</span>
|
|
|
- <span>{{clientData.buyModel}}</span>
|
|
|
- </div>
|
|
|
- <div class="basic_msg_item" style="width: 50%;">
|
|
|
<span class="basic_msg_data">vin码:</span>
|
|
|
- <span>{{clientData.vin}}</span>
|
|
|
- <img src="./img/edit.png" alt="" @click="handleEditOther('vin')">
|
|
|
+ <div class="phone_list">
|
|
|
+ <div v-for="(item, index) in clientData.vinList" :key="index">{{ item
|
|
|
+ }}</div>
|
|
|
+ </div>
|
|
|
+ <img src="./img/edit.png" alt="" @click="handleEditVin('vin码', clientData.vinList)">
|
|
|
</div>
|
|
|
<div class="basic_msg_item" style="width: 50%;" v-for="(item, index) in clientData.cols">
|
|
|
<span class="basic_msg_data">{{item.name}}:</span>
|
|
|
<span v-if="item.value">{{item.value[0]}}</span>
|
|
|
- <img src="./img/edit.png" alt="" @click="handleEditOther('cols')">
|
|
|
+ <img src="./img/edit.png" alt="" @click="handleEditOther()">
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- <div class="msg_title msg_title_line">服务信息</div>
|
|
|
@@ -500,7 +517,7 @@
|
|
|
<el-tabs class="three_tab_list" v-model="itemActiveName" stretch @tab-click="handleDetailTab">
|
|
|
<el-tab-pane label="画像" name="first"></el-tab-pane>
|
|
|
<el-tab-pane label="记录" name="second"></el-tab-pane>
|
|
|
- <!-- <el-tab-pane label="车辆" name="third"></el-tab-pane> -->
|
|
|
+ <el-tab-pane label="车辆" name="third"></el-tab-pane>
|
|
|
</el-tabs>
|
|
|
<div v-if="itemActiveName === 'first'">
|
|
|
<div class="data_box">
|
|
|
@@ -555,19 +572,10 @@
|
|
|
</div>
|
|
|
</div> -->
|
|
|
<div class="followup_list" v-for="(item, key) in recordList" :key="key">
|
|
|
- <div class="follow_time">
|
|
|
- <div class="time_dot">
|
|
|
- <div class="dot"></div>
|
|
|
- </div>
|
|
|
- <span>{{key}}</span>
|
|
|
- </div>
|
|
|
<div class="follow_padding">
|
|
|
- <div class="follow_item" v-for="(dt, dtIndex) in item" :key="dtIndex">
|
|
|
+ <div class="follow_item">
|
|
|
<div class="follow_item_time">
|
|
|
- <span class="item_time">{{timeFormat(dt.createdTime, 'hh:mm')}}</span>
|
|
|
- <!-- <span v-if="dt.type === 1">阅读日志</span>
|
|
|
- <span v-else-if="dt.type === 2">行为日志</span>
|
|
|
- <span v-else-if="dt.type === 3">修改日志</span> -->
|
|
|
+ <span class="item_time">{{timeFormat(item.bizTime, 'yyyy-MM-dd hh:mm:ss')}}</span>
|
|
|
</div>
|
|
|
<div class="item_box">
|
|
|
<div class="follow_item_line">
|
|
|
@@ -575,15 +583,79 @@
|
|
|
<div class="line"></div>
|
|
|
</div>
|
|
|
<div class="item_content">
|
|
|
- <div>{{dt.title}}</div>
|
|
|
- <div class="item_tip">{{dt.content}}</div>
|
|
|
- <div class="item_tip" v-if="dt.type === 1">持续时间:<span class="item_p">{{dt.duration}}</span>秒</div>
|
|
|
+ <div><span class="biz_code">{{item.bizCode}}</span>{{item.title}}</div>
|
|
|
+ <div class="item_tip">{{item.content}}</div>
|
|
|
+ <div class="item_tip" v-if="item.type === 1">持续时间:<span class="item_p">{{item.duration}}</span>秒</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-if="itemActiveName === 'third'">
|
|
|
+ <div class="data_box">
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">车牌号:</div>
|
|
|
+ <div>{{ clientData.carList && clientData.carList.length ?
|
|
|
+ clientData.carList[carIndex].carNo : '--' }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">VIN:</div>
|
|
|
+ <div>{{ clientData.carList && clientData.carList.length ?
|
|
|
+ clientData.carList[carIndex].vin : '--' }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">车型:</div>
|
|
|
+ <div>{{ clientData.carList && clientData.carList.length ?
|
|
|
+ clientData.carList[carIndex].buyModel : '--' }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">购车日期:</div>
|
|
|
+ <div>{{ clientData.carList && clientData.carList.length ?
|
|
|
+ timeFormat(clientData.carList[carIndex].billDate) : '--' }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">车辆里程数:</div>
|
|
|
+ <div>--</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="data_box">
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">保养类型:</div>
|
|
|
+ <div>--</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">保养的里程数:</div>
|
|
|
+ <div>--</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">保养服务时间:</div>
|
|
|
+ <div>--</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">预计下次保养的里程数:</div>
|
|
|
+ <div>--</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">预计下次保养服务时间:</div>
|
|
|
+ <div>--</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="data_box">
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">保险公司:</div>
|
|
|
+ <div>--</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">保险开始时间:</div>
|
|
|
+ <div>--</div>
|
|
|
+ </div>
|
|
|
+ <div class="belong_item">
|
|
|
+ <div class="belong_title">保险结束时间:</div>
|
|
|
+ <div>--</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="client_followUp" v-if="activeName === 'second'">
|
|
|
@@ -657,6 +729,22 @@
|
|
|
<el-button type="primary" @click="handleEditSave">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="编辑信息" :visible.sync="showInfoDialog">
|
|
|
+ <el-form class="prize_form" @submit.native.prevent>
|
|
|
+ <el-form-item :label="msgData.name" required>
|
|
|
+ <div v-for="(item, index) in msgData.List" :key="index">
|
|
|
+ <el-input v-model="msgData.List[index]" style="width: 250px;"></el-input>
|
|
|
+ <img class="add-icon" src="./img/qw/close_icon.png" alt="" @click="delPhone(index)">
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <img class="add-icon" src="./img/qw/con_add.png" alt="" @click="addPhone">
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="handleInfoSave(msgData.name)">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</body>
|
|
|
<script>
|
|
|
@@ -683,7 +771,46 @@
|
|
|
loading: false,
|
|
|
showEditDialog: false,
|
|
|
editFormList: [],
|
|
|
- editType: '',
|
|
|
+ carIndex: 0,
|
|
|
+ showInfoDialog: false,
|
|
|
+ msgData: {
|
|
|
+ name: '手机号',
|
|
|
+ List: []
|
|
|
+ },
|
|
|
+ bizCodeList: [
|
|
|
+ {
|
|
|
+ key: 'DELETE',
|
|
|
+ name: '客户流失'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'INTO_GROUP',
|
|
|
+ name: '进群'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'READ',
|
|
|
+ name: '阅读'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'SUBMIT',
|
|
|
+ name: '留资'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'FLOW',
|
|
|
+ name: '到店'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'AFTER_SALE',
|
|
|
+ name: '售后进站'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'TEST_DRIVE',
|
|
|
+ name: '试驾 '
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'ACT_SALES',
|
|
|
+ name: '成交'
|
|
|
+ }
|
|
|
+ ],
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -849,7 +976,12 @@
|
|
|
}).then(result => {
|
|
|
let { data, code, msg } = result
|
|
|
if (code === 1) {
|
|
|
- this.recordList = data
|
|
|
+ this.recordList = data.records
|
|
|
+ if (this.recordList && this.recordList.length) {
|
|
|
+ this.recordList.forEach(item => {
|
|
|
+ item.bizCode = this.bizCodeList.find(i => i.key === item.bizCode)?.name || item.bizCode
|
|
|
+ })
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: msg,
|
|
|
@@ -963,53 +1095,53 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 删除手机号
|
|
|
+ delPhone(index) {
|
|
|
+ this.msgData.List.splice(index, 1)
|
|
|
+ },
|
|
|
+ addPhone() {
|
|
|
+ this.msgData.List.push('')
|
|
|
+ },
|
|
|
// 编辑手机号
|
|
|
- handleEdit(title, value, type) {
|
|
|
- this.editFormList = [{
|
|
|
+ handleEdit(title, value) {
|
|
|
+ this.msgData = {
|
|
|
name: title,
|
|
|
- type: 0,
|
|
|
- value: [value]
|
|
|
- }]
|
|
|
- this.editType = type
|
|
|
- this.showEditDialog = true
|
|
|
- },
|
|
|
- // 编辑其他字段
|
|
|
- handleEditOther(type) {
|
|
|
- if (type === 'vin') {
|
|
|
- this.editFormList = [{
|
|
|
- name: 'vin码',
|
|
|
- type: 0,
|
|
|
- value: [this.clientData.vin]
|
|
|
- }]
|
|
|
- } else if (type === 'cols') {
|
|
|
- this.editFormList = this.clientData.cols
|
|
|
+ List: this.deepCopy(value || [''])
|
|
|
}
|
|
|
- this.editType = 'other'
|
|
|
- this.showEditDialog = true
|
|
|
+ this.showInfoDialog = true
|
|
|
},
|
|
|
- handleEditSave() {
|
|
|
- if (this.editType === 'phone') {
|
|
|
- this.editPhone()
|
|
|
- } else if (this.editType === 'other') {
|
|
|
- this.editOthers()
|
|
|
+ // 编辑vin码
|
|
|
+ handleEditVin(title, value) {
|
|
|
+ this.msgData = {
|
|
|
+ name: title,
|
|
|
+ List: this.deepCopy(value || [''])
|
|
|
}
|
|
|
+ this.showInfoDialog = true
|
|
|
},
|
|
|
- // 修改手机号
|
|
|
- editPhone() {
|
|
|
- if (this.editFormList[0].value[0].length > 11) {
|
|
|
- this.$message({
|
|
|
- message: '请输入正确的手机号',
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
- return
|
|
|
+ handleInfoSave (title) {
|
|
|
+ let url = ''
|
|
|
+ let obj = {
|
|
|
+ clientId: this.clientData.clientId,
|
|
|
}
|
|
|
- fetch(this.httpUrl + `/scrm/v1/wxcp-client-pro/p/updatePhone?bId=${this.bId}&externalUserId=${this.externalUserId}&memberId=${this.memberId}&phone=${this.editFormList[0].value[0]}`)
|
|
|
- .then(res => {
|
|
|
- return res.json()
|
|
|
- }).then(result => {
|
|
|
+ if (title === 'vin码') {
|
|
|
+ url = `/scrm/v1/wxcp-client-pro/p/updateClientVin`
|
|
|
+ obj.vinList = this.msgData.List
|
|
|
+ } else if (title === '手机号') {
|
|
|
+ url = `/scrm/v1/wxcp-client-pro/p/updateClientPhones`
|
|
|
+ obj.phones = this.msgData.List
|
|
|
+ }
|
|
|
+ fetch(this.httpUrl + url, {
|
|
|
+ method: 'post',
|
|
|
+ body: JSON.stringify(obj),
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json'
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ return res.json()
|
|
|
+ }).then(result => {
|
|
|
let { data, code, msg } = result
|
|
|
if (code === 1) {
|
|
|
- this.showEditDialog = false
|
|
|
+ this.showInfoDialog = false
|
|
|
this.getClientExt()
|
|
|
this.$message({
|
|
|
message: '编辑成功',
|
|
|
@@ -1024,15 +1156,28 @@
|
|
|
})
|
|
|
},
|
|
|
// 编辑其他字段
|
|
|
+ handleEditOther() {
|
|
|
+ let arr = []
|
|
|
+ arr = this.clientData.cols.map(item => {
|
|
|
+ return {
|
|
|
+ name: item.name,
|
|
|
+ value: item.value || []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.editFormList = this.deepCopy(arr)
|
|
|
+ this.showEditDialog = true
|
|
|
+ },
|
|
|
+ handleEditSave() {
|
|
|
+ this.editOthers()
|
|
|
+ },
|
|
|
+ // 编辑其他字段
|
|
|
editOthers() {
|
|
|
fetch(this.httpUrl + '/scrm/v1/wxcp-client-pro/p/updateExt', {
|
|
|
method: 'post',
|
|
|
body: JSON.stringify({
|
|
|
- bid: this.bId,
|
|
|
- externalUserId: this.externalUserId,
|
|
|
+ clientId: this.clientData.clientId,
|
|
|
memberId: this.memberId,
|
|
|
cols: this.clientData.cols,
|
|
|
- vin: this.editFormList[0].value[0],
|
|
|
}),
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json'
|
|
|
@@ -1056,6 +1201,24 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ deepCopy(obj) {
|
|
|
+ if (!obj || typeof obj !== 'object') {
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ let result = null
|
|
|
+ if (Object.prototype.toString.call(obj) === '[object Object]') {
|
|
|
+ result = {}
|
|
|
+ Object.keys(obj).forEach((key) => {
|
|
|
+ result[key] = this.deepCopy(obj[key])
|
|
|
+ })
|
|
|
+ } else if (Array.isArray(obj)) {
|
|
|
+ result = []
|
|
|
+ obj.forEach((item) => {
|
|
|
+ result.push(this.deepCopy(item))
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return result
|
|
|
+ },
|
|
|
// 截取url中的数据
|
|
|
getQueryParam(paramName) {
|
|
|
// 获取当前URL的查询字符串部分
|