Commit b869cb89 by 李伟康

commit 提交

1 parent e02b5fb9
...@@ -106,8 +106,16 @@ const syncBadge=(params = {}) =>{ ...@@ -106,8 +106,16 @@ const syncBadge=(params = {}) =>{
}) })
} }
/**导出 */
const exportReclistList = (params = {}) =>{
params.method = 'scrm.api.mindworkplate.badge.employeeBadgeReclistExport'
return http({
url: 'rop-scrm-partner/router',
method: 'POST',
data: params,
sign: true
})
}
export default { export default {
getReclistWithPage, getReclistWithPage,
...@@ -117,5 +125,6 @@ export default { ...@@ -117,5 +125,6 @@ export default {
getPointCategory, getPointCategory,
conversationCheckList, conversationCheckList,
conversationDetailPage, conversationDetailPage,
syncBadge syncBadge,
exportReclistList
} }

2.2 KB | W: | H:

5.12 KB | W: | H:

src/assets/role-one.png
src/assets/role-one.png
src/assets/role-one.png
src/assets/role-one.png
  • 2-up
  • Swipe
  • Onion skin

2.16 KB | W: | H:

5.06 KB | W: | H:

src/assets/role-two.png
src/assets/role-two.png
src/assets/role-two.png
src/assets/role-two.png
  • 2-up
  • Swipe
  • Onion skin
<!-- 关联活动订单弹窗 --> <!-- 关联活动订单弹窗 -->
<template> <template>
<GLDialog big-title="质检详情" mode="big" :visible.sync="isQualityVisible" class="qualityDailog" width="80%" :close-on-click-modal="false" @onOk="handleClose" @onCancel="handleClose" @close="handleClose" > <div class="quality-box">
<div> <template v-if="qualityDetailList.length">
<el-tabs v-model="activeName" @tab-click="handleReset"> <div class="overview">
<el-tab-pane label="质检分析" name="analyse"> <template v-for="(i,index) in overviewObject">
<quality-analyse v-if="activeName == 'analyse'" v-bind="$attrs" ref="analyseList" /> <div
</el-tab-pane> :key="index"
<el-tab-pane label="对话详情" name="dialogue"> class="overview-item"
<dialogue-detail v-if="activeName == 'dialogue'" ref="dialogueDetail" v-bind="$attrs" /> >
</el-tab-pane> <div class="label">{{i.label}}</div>
</el-tabs> <div class="value">
</div> <template v-if="i.formatter">
</GLDialog> <div v-html="i.formatter(qualityDetailList[currentNum])">
</div>
</template>
<template v-else>
{{qualityDetailList[currentNum][i.key] || '-'}}
</template>
</div>
</div>
</template>
</div>
<div class="content" :key="currentNum">
<div class="dialogue-box">
<dialogue-detail :detailObj="qualityDetailList[currentNum]" />
</div>
<div class="analyse-box">
<quality-analyse :detailObj="qualityDetailList[currentNum]" />
</div>
</div>
</template>
<div class="footer-box">
<el-button
size="small"
:class="{opacity:currentNum == 0}"
@click="jump(-1)"
>上一条</el-button>
<div class="text">{{currentNum + 1}}/{{qualityDetailList.length}}</div>
<el-button
type="primary"
size="small"
:class="{opacity:currentNum == qualityDetailList.length - 1}"
@click="jump(1)"
>下一条</el-button>
</div>
</div>
</template> </template>
<script> <script>
import QualityAnalyse from './qualityAnalyse' import QualityAnalyse from './qualityAnalyse'
import DialogueDetail from './dialogueDetail' import DialogueDetail from './dialogueDetail'
const toMinutesAndSeconds = (seconds) => {
seconds = Math.floor(seconds / 1000)
let formattedTime = ''
if (seconds < 60) {
return seconds + '<span class="unit">秒</span>'
} else if (seconds > 3600) {
let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60)
if (hours > 0) formattedTime += hours + '<span class="unit">小时</span>'
if (minutes > 0 || hours > 0) formattedTime += minutes + '<span class="unit">分钟</span>'
return formattedTime
} else {
let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60),
remainingSeconds = seconds % 60
if (hours > 0) formattedTime += hours + '<span class="unit">小时</span>'
if (minutes > 0 || hours > 0) formattedTime += minutes + '<span class="unit">分钟</span>'
if (remainingSeconds > 0) formattedTime += remainingSeconds + '<span class="unit">秒</span>'
return formattedTime
}
}
export default { export default {
name: 'RelatActivityOrderDialog', name: '',
components: { components: {
QualityAnalyse, QualityAnalyse,
DialogueDetail DialogueDetail
}, },
data() { data () {
return { return {
activeName: 'analyse', overviewObject: [
{
label: '客户姓名',
key: 'customerName',
},
{
label: '车型',
key: 'carModel',
},
{
label: 'APP接待结果',
formatter (row) {
const val = {
1: '成交',
0: '战败'
}[row.receptionStatus],
color = {
1: '#2CCA74',
0: '#EB4E4E'
}[row.receptionStatus]
return `<span style="font-size:22px;color:${color}">${val || '-'}</span>`
} }
}, },
{
props: { label: '预计营销结果',
isQualityVisible: { formatter (row) {
type: Boolean, const color = {
default: false '成交': '#2CCA74',
'战败': '#EB4E4E'
}[row.estimatedResult] || '#999999'
return `<span style="font-size:22px;color:${color}">${row.estimatedResult}</span>`
}
},
{
label: '话术评分',
formatter (row) {
return `<div class="num">${row.score}<span class="unit">分</span></div>`
}
},
{
label: '接待时长',
formatter (row) {
return `<div class="num">${toMinutesAndSeconds(row.duration)}</div>`
}
}
],
activeName: 'analyse',
currentNum: 0,
qualityDetailList: []
} }
}, },
computed: {},
mounted() {
mounted () {
const quality_detail_object = JSON.parse(localStorage.getItem('quality_detail_object') || {})
this.currentNum = quality_detail_object.currentNum || 0
this.qualityDetailList = quality_detail_object.list || []
}, },
methods: { methods: {
handleReset() {}, jump (num) {
handleClose() { try {
this.$emit('closeDialog', false) const { qualityDetailList, currentNum } = this,
max = qualityDetailList.length - 1
if ((currentNum == 0 && num == -1) || (currentNum == max && num == 1)) throw '无更多接待记录'
this.currentNum += num
} catch (error) {
if(error) this.$message.error(error)
}
} }
} }
} }
</script> </script>
<style scoped> <style scoped lang='scss'>
.el-tabs{ .quality-box {
margin-top:-10px; .overview {
display: flex;
align-items: center;
background: #ffffff;
padding: 20px;
justify-content: space-between;
&-item {
width: calc((100% - 40px) / 6);
background: #f7f9fa;
border-radius: 4px;
box-sizing: border-box;
height: 92px;
padding: 16px;
font-size: 14px;
color: #333333;
.label {
line-height: 20px;
}
.value {
font-weight: 600;
font-size: 20px;
color: #333333;
margin-top: 8px;
line-height: 32px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
/deep/.num {
font-weight: 700;
font-size: 26px;
.unit {
font-weight: 400;
font-size: 14px;
color: #333333;
}
}
}
}
} }
.content {
display: flex;
margin-top: 16px;
height: calc(100vh - 276px);
overflow: hidden;
.dialogue-box {
width: 40%;
}
.analyse-box {
width: calc(60% - 16px);
margin-left: auto;
}
}
.footer-box {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 64px;
font-size: 14px;
color: #666666;
display: flex;
align-items: center;
justify-content: center;
.text {
margin: 0 16px;
}
.opacity{
opacity: .5;
}
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -5,21 +5,20 @@ ...@@ -5,21 +5,20 @@
<div class="info-wrap"> <div class="info-wrap">
<div class="info-item flex"> <div class="info-item flex">
<label>员工:</label> <label>员工:</label>
<span>{{ queryData.employeeName }}</span> <span>{{ queryData.employeeName }} {{queryData.phoneNumber || ''}}</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>门店:</label> <label>门店:</label>
<template v-if="queryData.storeList"> <span>{{queryData.merchantName || '-'}}</span>
<el-tooltip effect="dark" :content="queryData.storeList.join('、')" placement="top-start">
<span>{{ queryData.storeList.join('、') }}</span>
</el-tooltip>
</template>
<span v-else>-</span>
</div> </div>
<div class="info-item flex"> <div class="info-item flex">
<label>服务商:</label> <label>服务商:</label>
<template v-if="queryData.serviceList"> <template v-if="queryData.serviceList">
<el-tooltip effect="dark" :content="queryData.serviceList.join('、')" placement="top-start"> <el-tooltip
effect="dark"
:content="queryData.serviceList.join('、')"
placement="top-start"
>
<span>{{ queryData.serviceList.join('、') }}</span> <span>{{ queryData.serviceList.join('、') }}</span>
</el-tooltip> </el-tooltip>
</template> </template>
...@@ -36,44 +35,82 @@ ...@@ -36,44 +35,82 @@
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<GLCombiForm ref="showSearch" class="show-search" labelWidth="110px" :formObj="searchForm" :form-data="showFormData" @handleOk="handleSearch" @handleRest="handleReset"> <h2>接待列表</h2>
<div class="content-box">
<GLCombiForm
ref="showSearch"
class="show-search"
labelWidth="110px"
:formObj="searchForm"
:form-data="showFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
>
<template slot="score"> <template slot="score">
<el-input-range start-placeholder="请输入" end-placeholder="请输入" :displayValue="searchForm.qualityTestScore"></el-input-range> <el-input-range
start-placeholder="请输入"
end-placeholder="请输入"
:displayValue="searchForm.qualityTestScore"
></el-input-range>
</template> </template>
</GLCombiForm> </GLCombiForm>
<GLTable ref="recepDetail" :get-list-api="getListApi" :hasNum="false" :search-form="searchFormSearch" :table-params="tableParams" :before-search-fn="beforeSearchFn" @setTableFinishFun="setTableFinishFun" :pageConf="pageConf"> <GLTable
<div slot="durationHtml" slot-scope="scope"> ref="recepDetail"
:get-list-api="getListApi"
:hasNum="false"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
@setTableFinishFun="setTableFinishFun"
:pageConf="pageConf"
>
<div
slot="durationHtml"
slot-scope="scope"
>
<template v-if="scope.scope.duration"> <template v-if="scope.scope.duration">
{{ toMinutesAndSeconds(scope.scope.duration) }} {{ toMinutesAndSeconds(scope.scope.duration) }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<div slot="scoreHtml" slot-scope="scope"> <div
slot="scoreHtml"
slot-scope="scope"
>
<template v-if="scope.scope.score || scope.scope.score === 0"> <template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }} {{ scope.scope.score }}
</template> </template>
<template v-else>--</template> <template v-else>--</template>
</div> </div>
<div slot="estimatedResult" slot-scope="scope" :class="['tag', scope.scope.estimatedResult == '成交' ? (scope.scope.estimatedResult == '战败' ? 'redBg' : 'greenBg') : 'grayBg']"> <div
slot="estimatedResult"
slot-scope="scope"
:class="['tag', scope.scope.estimatedResult == '成交' ? (scope.scope.estimatedResult == '战败' ? 'redBg' : 'greenBg') : 'grayBg']"
>
{{ scope.scope.estimatedResult }} {{ scope.scope.estimatedResult }}
</div> </div>
<template slot="auth-button" slot-scope="scope"> <template
<el-button type="text" @click="qualitDetail(scope.scope)">质检详情</el-button> slot="auth-button"
slot-scope="scope"
>
<el-button
type="text"
@click="qualitDetail(scope.scope)"
>质检详情</el-button>
</template> </template>
</GLTable> </GLTable>
</div> </div>
<quality-detail :isQualityVisible="isQualityVisible" v-if="isQualityVisible" :detailObj="detailObj" @closeDialog="closeDialog"></quality-detail> </div>
</div> </div>
</template> </template>
<script> <script>
import { Util, deepClone } from '@/common/util' import { Util, deepClone } from '@/common/util'
import ElInputRange from './el-input-range' import ElInputRange from './el-input-range'
import QualityDetail from './qualityDetail.vue' let viewStorage = null
export default { export default {
data() { data () {
return { return {
queryData: JSON.parse(this.$route.query.data), queryData: {},
isQualityVisible: false,
searchForm: { searchForm: {
recepTime: [], recepTime: [],
qualityTestScore: [], qualityTestScore: [],
...@@ -116,17 +153,21 @@ export default { ...@@ -116,17 +153,21 @@ export default {
prop: 'key' prop: 'key'
}, },
{ {
label: '开始接待时间', label: "客户姓名",
prop: 'startTime' prop: "customerName"
}, },
{ {
label: '结束接待时间', label: "车型",
prop: 'endTime' prop: "carModel"
}, },
{ {
label: '录音时长', label: "APP接待结果",
prop: 'duration', formatter (row) {
addHtml: 'durationHtml' return row.receptionStatus != null ? {
1: '成交',
0: '战败'
}[row.receptionStatus] : '--'
}
}, },
{ {
label: '预计营销结果', label: '预计营销结果',
...@@ -137,7 +178,22 @@ export default { ...@@ -137,7 +178,22 @@ export default {
label: '话术质检评分/分', label: '话术质检评分/分',
prop: 'score', prop: 'score',
addHtml: 'scoreHtml' addHtml: 'scoreHtml'
} },
{
label: '接待时长',
prop: 'duration',
addHtml: 'durationHtml'
},
{
label: '开始接待时间',
prop: 'startTime'
},
{
label: '结束接待时间',
prop: 'endTime'
},
] ]
}, },
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }, pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' },
...@@ -160,14 +216,24 @@ export default { ...@@ -160,14 +216,24 @@ export default {
} }
}, },
components: { components: {
ElInputRange, ElInputRange
QualityDetail
}, },
mounted() { mounted () {
this.setQuery()
this.getOptionsList() this.getOptionsList()
}, },
methods: { methods: {
toMinutesAndSeconds(seconds) { setQuery () {
const query = this.$route?.query?.data ? JSON.parse(this.$route.query.data) : ''
if (viewStorage) this.queryData = viewStorage
if (query) {
this.queryData = query
viewStorage = query
}
let [url] = window.location.href.split('?')
window.history.replaceState('', '', `${url}?data=${encodeURIComponent(JSON.stringify(viewStorage))}`)
},
toMinutesAndSeconds (seconds) {
seconds = Math.floor(seconds / 1000) seconds = Math.floor(seconds / 1000)
let formattedTime = '' let formattedTime = ''
if (seconds < 60) { if (seconds < 60) {
...@@ -188,10 +254,10 @@ export default { ...@@ -188,10 +254,10 @@ export default {
return formattedTime return formattedTime
} }
}, },
handleSearch() { handleSearch () {
this.$refs.recepDetail.refreshTable(true, true) this.$refs.recepDetail.refreshTable(true, true)
}, },
handleReset() { handleReset () {
this.searchForm = { this.searchForm = {
recepTime: [], recepTime: [],
qualityTestScore: [], qualityTestScore: [],
...@@ -199,20 +265,24 @@ export default { ...@@ -199,20 +265,24 @@ export default {
} }
this.$refs.recepDetail.refreshTable() this.$refs.recepDetail.refreshTable()
}, },
closeDialog() { qualitDetail (row) {
console.log(this.isQualityVisible) const list = this.$refs.recepDetail.data,
this.isQualityVisible = false currentNum = list.findIndex(e => e.id == row.id)
}, localStorage.setItem('quality_detail_object', JSON.stringify({
qualitDetail(row) { list,
console.log(row) currentNum
this.detailObj = row }))
this.isQualityVisible = true this.$router.push({
path: '/qualityManage/qualityDetail'
})
}, },
beforeSearchFn() { beforeSearchFn () {
return new Promise(resolve => { return new Promise(resolve => {
this.setQuery()
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.conversationDateId = this.queryData.id this.searchFormSearch.conversationDateId = this.queryData.id
this.searchFormSearch.pageNum = this.searchFormSearch.currentPage this.searchFormSearch.pageNum = this.searchFormSearch.currentPage
this.searchFormSearch.merchantNo = this.queryData.merchantNo
if (this.searchFormSearch.qualityTestScore) { if (this.searchFormSearch.qualityTestScore) {
this.searchFormSearch.qualityTestScoreBegin = this.searchFormSearch.qualityTestScore[0] this.searchFormSearch.qualityTestScoreBegin = this.searchFormSearch.qualityTestScore[0]
this.searchFormSearch.qualityTestScoreEnd = this.searchFormSearch.qualityTestScore[1] this.searchFormSearch.qualityTestScoreEnd = this.searchFormSearch.qualityTestScore[1]
...@@ -233,12 +303,12 @@ export default { ...@@ -233,12 +303,12 @@ export default {
resolve() resolve()
}) })
}, },
setTableFinishFun(data) { setTableFinishFun (data) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
data[i].key = i + 1 data[i].key = i + 1
} }
}, },
getOptionsList() { getOptionsList () {
this.showFormData.forEach((item, index) => { this.showFormData.forEach((item, index) => {
if (item.type === 'select') { if (item.type === 'select') {
if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') { if (this.baseData[item.optionsName].length && this.baseData[item.optionsName][0][this.showFormData[index].optionLabel] !== '全部') {
...@@ -257,11 +327,6 @@ export default { ...@@ -257,11 +327,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.recep-wrap { .recep-wrap {
margin: 0 16px; margin: 0 16px;
.header {
width: 100%;
background: #ffffff;
h2 { h2 {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
...@@ -274,6 +339,10 @@ export default { ...@@ -274,6 +339,10 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
.header {
width: 100%;
background: #ffffff;
.info-wrap { .info-wrap {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -309,16 +378,18 @@ export default { ...@@ -309,16 +378,18 @@ export default {
} }
} }
} }
.show-search{ .show-search {
margin-bottom:-52px; margin-bottom: -52px;
} }
.content { .content {
background: #ffffff; background: #ffffff;
padding: 20px;
box-sizing: border-box; box-sizing: border-box;
margin-top: 16px; margin-top: 16px;
width: 100%; width: 100%;
height: auto; height: auto;
&-box {
padding: 20px;
}
} }
.tag { .tag {
padding: 0 8px; padding: 0 8px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!