Commit b2b4f04e by zhangquan

Merge branch 'SAAS-V4.37.0' of http://192.168.3.233:8090/saas_plus/dj-car-life-s…

…ystem into SAAS-V4.37.0
2 parents 2602f1e9 df200abc
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-03-14 13:42:35
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-03-15 09:56:24
* @FilePath: \dj-car-life-system\src\api\permeation.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import request from "./request"
//获取所有主营品牌列表
export function brandList(data) {
data.method = "dj.api.smartcarlife.common.car.brand.list"
return request(data)
}
// 查询4s店列表
export function listShop4sByRef(data) {
data.method = "dj.api.scenemerchantref.listShop4sByRef"
return request(data)
}
//渗透率报表(分页)
export function permeabilityList(data) {
data.method = "dj.api.smarcarlife.permeability.report.page"
return request(data)
}
//渗透率报表导出
export function permeabilityExport(data) {
data.method = "dj.api.smartcarlife.permeability.report.exportAsync"
return request(data)
}
//渗透率报表填报明细列表(分页)
export function permeabilityDetail(data) {
data.method = "dj.api.smarcarlife.permeability.report.detail.page"
return request(data)
}
//渗透率报表详情导出
export function permeabilityDetailExport(data) {
data.method = "dj.api.smartcarlife.permeability.report.detail.exportAsync"
return request(data)
}
import request from "./request"
const path = "dj.api.mindworkplate."
const path2 = "dj.api.smartcarlife."
// 质检管理
export function getReclistWithPage(data) {
data.method = `${path}badge.employeeBadgeReclistWithPage`
return request(data, "post")
}
// 分页查询接待批次列表
export function conversationPage(data) {
data.method = `${path2}inspection.conversation.batch.page`
return request(data, "post")
}
// 质检点管理-分页列表
export function conversationPointPage(data) {
data.method = `${path2}inspection.conversation.point.page`
return request(data, "post")
}
// 工牌管理
export function employeeBadgelistWithPage(data) {
data.method = `${path}badge.employeeBadgelistWithPage`
return request(data, "post")
}
// 同步数据
export function syncBadge(data = {}) {
data.method = `${path}badge.syncBadge`
return request(data, "post")
}
// 工牌统计管理
export function statisticsEmployeeBadge(data) {
data.method = `${path}badge.statisticsEmployeeBadge`
return request(data, "post")
}
// 质检详情-质检分析
export function conversationCheckList(data) {
data.method = `${path2}inspection.conversation.check.detail`
return request(data, "post")
}
// 质检详情-分页查询对话列表
export function conversationDetailPage(data) {
data.method = `${path2}inspection.conversation.detail.page`
return request(data, "post")
}
//获取一级二级分类
export function getPointCategory(data={}) {
data.method = `${path2}inspection.conversation.point.category`
return request(data, "post")
}
// 获取品牌方/供应方
export function getBrandSupplyMerchant(data) {
data.method = `${path}goods.type.queryGoodsRelatedParty`
return request(data, "post")
}
// 新增供应方
export function addBrandSupplyMerchant(data) {
data.method = `${path}goods.type.addGoodsRelatedParty`
return request(data, "post")
}
// 编辑/删除供应方
export function editBrandSupplyMerchant(data) {
data.method = `${path}goods.type.editGoodsRelatedParty`
return request(data, "post")
}
// 获取素材详情
export function getProductInfo(data) {
data.method = `${path}goodsinfo.get.byId`
return request(data, "post")
}
......@@ -277,18 +277,26 @@ export default {
},
mounted() {
var params = { currentPage: 1, pageSize: 100, merchantIdName: "" }
getMerchantList(params)
.then((res) => {
this.getBaseData(res.list)
})
.catch(() => {
this.getBaseData([])
})
var params = { currentPage: 1, pageSize: 2000, merchantIdName: "" }
this.getBaseData()
getMerchantList(params).then((res) => {
this.getSetMerchant(res.list || [])
})
},
methods: {
getBaseData(res) {
getSetMerchant(res) {
this.showFormData.forEach((item, index) => {
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
merchantName: "全部"
})
this.$set(this.showFormData[index], "optionList", res)
}
})
},
getBaseData() {
const allOpt = {
id: "",
label: "全部"
......@@ -308,13 +316,6 @@ export default {
this.baseData[item.optionsName]
)
}
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
merchantName: "全部"
})
this.$set(this.showFormData[index], "optionList", res)
}
})
},
handleReset() {
......
......@@ -34,14 +34,7 @@
<script>
import { Util, deepClone } from "@/common/util"
import {
CONTENT_TYPE_OPTIONS,
SCENE_OPTIONS,
CHANNEL_OPTIONS,
STATUS_OPTIONS,
STATUS_ENUM
} from "./constant"
import { getStatisticsList, exportStatisticsList } from "@api/contentManager"
import { getStatisticsList, exportStatisticsList,getMerchantList } from "@api/contentManager"
export default {
name: "contentManagerList",
data() {
......@@ -62,13 +55,12 @@ export default {
pickerOptions: "beforeRangePickerOptions"
},
{
label: "所属门店",
name: "type",
label: "可见门店",
name: "merchantId",
type: "select",
optionList: [],
optionId: "id",
optionLabel: "label",
optionsName: "contentTypeOptions"
optionId: "merchantNo",
optionLabel: "merchantName"
}
],
// 基本数据
......@@ -110,7 +102,7 @@ export default {
},
mounted() {
var params = { currentPage: 1, pageSize: 100, merchantIdName: "" }
var params = { currentPage: 1, pageSize: 2000, merchantIdName: "" }
getMerchantList(params)
.then((res) => {
this.getBaseData(res.list)
......@@ -126,21 +118,16 @@ export default {
id: "",
label: "全部"
}
this.baseData = {
contentTypeOptions: deepClone(CONTENT_TYPE_OPTIONS),
sceneOptions: deepClone(SCENE_OPTIONS),
channelOptions: deepClone(CHANNEL_OPTIONS),
statuslOptions: deepClone(STATUS_OPTIONS)
}
this.showFormData.forEach((item, index) => {
if (item.type === "select" && this.baseData[item.optionsName]) {
this.baseData[item.optionsName].unshift(allOpt)
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
// if (item.type === "select" && this.baseData[item.optionsName]) {
// this.baseData[item.optionsName].unshift(allOpt)
// this.$set(
// this.showFormData[index],
// "optionList",
// this.baseData[item.optionsName]
// )
// }
if (item.type === "select" && item.name === "merchantId") {
res.unshift({
merchantNo: "",
......@@ -154,6 +141,7 @@ export default {
for (const key in this.searchForm) {
this.searchForm[key] = ""
}
this.searchForm.goodsType = 0
this.realSearchForm = {}
this.$refs.contentTable.refreshTable(true, true)
},
......
......@@ -37,6 +37,7 @@
</div>
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:table-data="tableData"
:search-form="searchFormSearch"
:table-params="tableParams"
......@@ -50,32 +51,28 @@
<script>
import { Util, deepClone } from "@/common/util"
import { permeabilityDetail } from "@/api/permeation.js"
import { mapActions, mapState } from "vuex"
import { dfBalanceMonthStatListStatYear } from "@api/balanceStatistics"
import { rangePickerOptions_year_2023 } from "@/common/format"
import dayjs from "dayjs"
export default {
name: "DetailDialog",
components: {},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
pickerOption: rangePickerOptions_year_2023,
getListApi: permeabilityDetail,
countObj: {},
searchForm: {
statYear: "",
merchantId: ""
},
searchForm: {},
searchFormSearch: {},
searchSelectObj: {},
showFormData: [
{
label: "员工姓名",
name: "putStatus",
name: "staffName",
type: "input"
},
{
label: "填报日期",
name: "putStatus",
name: "createdDate",
type: "datePicker"
}
],
......@@ -89,15 +86,15 @@ export default {
tableColumns: [
{
label: "员工名称",
prop: "statMonth"
prop: "staffName"
},
{
label: "填报交付数",
prop: "statMonth"
prop: "deliveryCount"
},
{
label: "填报时间",
prop: "statMonth"
prop: "createdDate"
}
]
},
......@@ -110,46 +107,62 @@ export default {
type: Boolean,
default: false
},
recordInfo: {
type: Object,
default: () => {}
merchantId: {
type: String,
default: ""
}
},
computed: {},
computed: {
...mapState({
dowloadList: (state) => state.d2admin.user.dowloadList
})
},
mounted() {
const nowDate = new Date()
this.searchForm.statYear = nowDate.getFullYear().toString()
if (this.recordInfo) {
// this.searchForm.merchantId = this.recordInfo.merchantId
}
// this.getList()
this.searchForm.merchantId = this.merchantId
},
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close"
}),
...mapActions("d2admin/user", ["actionSetDownloadList"]),
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch = this.getParams()
resolve()
})
},
chooseYear() {
this.getList()
getParams() {
this.searchFormSearch = deepClone(this.searchForm)
if (this.searchFormSearch.createdDate) {
this.searchFormSearch.reportStartDate = dayjs(
this.searchFormSearch.createdDate[0]
).format("YYYY-MM-DD")
this.searchFormSearch.reportEndDate = dayjs(
this.searchFormSearch.createdDate[1]
).format("YYYY-MM-DD")
}
return this.searchFormSearch
},
getList() {
var params = deepClone(this.searchForm)
dfBalanceMonthStatListStatYear(params).then((res) => {
this.tableData = res
})
handleExport() {
var params = this.getParams()
params.method =
"dj.api.smartcarlife.permeability.report.detail.exportAsync"
const list = [
...this.dowloadList,
{
name: "dowloadList",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: "dowloadList" })
},
handleReset() {
this.searchForm = {
merchantId: this.merchantId
}
this.$refs.recordTable.refreshTable()
},
handleClose() {
this.$emit("dialogClose")
}
......
<template>
<div class="dialogue">
<div class="record">
<audio id="audio1" controls>
<source src="/i/audio/song.mp3" type="audio/mpeg" />
<source src="/i/audio/song.ogg" type="audio/ogg" />
<audio id="audio1">
<source :src="detailObj.fileUrl" type="audio/mpeg" />
<source :src="detailObj.fileUrl" type="audio/ogg" />
您的浏览器不支持 audio 标签。
</audio>
<div class="play">
<div class="play" v-if="isPlay" @click="handleAudio">
<img src="@/assets/play.png" />
</div>
<div id="progress-bar">
<div id="progress"></div>
<div class="play" v-else @click="handleAudio">
<img src="@/assets/pause.png" />
</div>
<div class="times">{{ currentTime }}/{{ totalTime }}</div>
<div
id="progressBar"
@mousemove="isCircle = true"
@mouseout="isCircle = false"
>
<div id="progress">
<div
class="circle"
@mousemove="isCircle = true"
draggable="true"
v-if="isCircle"
></div>
</div>
</div>
<div class="trumpet" @click="handleAudio">
<img src="@/assets/trumpet.png" />
</div>
</div>
<div class="record-info">
<div class="dialog">
<div class="dialog-detail">
<div class="name">顾客</div>
<div class="dig-content">
加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势。
<template v-for="item in dialogList">
<div class="dialog-detail" :key="item.id">
<div class="name">{{ item.role }}</div>
<div class="dig-content">
{{ item.content }}
</div>
</div>
</div>
<div class="dialog-detail">
<div class="name">销售 @张可</div>
<div class="dig-content">
加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势加装方案特点优势。
</div>
</div>
</template>
</div>
<div class="abstract">
<div class="title">
<img class="robot" src="@/assets/robot.png" />AI对话摘要
</div>
<div class="abText">
在提车环节中,我们的驻点人员与问界车主进行了基于精品加装的沟通。我们了解到车主对车辆的外观和内饰有较高的要求,希望能够进行个性化的改装。
我们的驻点人员积极回应了车主的需求,并向其推荐了一系列精品加装方案。我们向车主详细介绍了各种加装方案的特点和优势,并提供了相关的图片和样品供其参考。
在沟通过程中,我们的驻点人员充分听取了车主的意见和建议,并根据其喜好和需求进行了方案的调整和优化。我们还向车主展示了其他车主的改装案例,以增加其对改装效果的信心。
最终,我们的驻点人员与车主达成了一致意见,并成功签订了改装合同。我们对车主的选择表示了感谢,并承诺将提供优质的服务和专业的技术支持,以确保改装工作的顺利进行和最终的成功。
{{ detailObj.digest }}
</div>
</div>
</div>
......@@ -44,17 +55,107 @@
</template>
<script>
export default {}
import { conversationDetailPage, getPointCategory } from "@api/resident"
export default {
props: {
detailObj: {
type: Object,
default: {}
}
},
data() {
return {
myAud: "",
isPlay: true,
dialogList: [],
totalTime: "0:00",
currentTime: "0:00",
isCircle: false
}
},
mounted() {
this.myAud = document.getElementById("audio1")
this.handleprogress()
this.conversationDetailPage()
},
methods: {
toMinutesAndSeconds(seconds) {
const minutes = Math.floor(seconds / 60)
const remainingSeconds = parseInt(seconds % 60)
return `${minutes}:${remainingSeconds}`
},
handleprogress() {
const progress = document.getElementById("progress")
const progressBar=document.getElementById("progressBar")
this.myAud.addEventListener("canplay", () => {
if (this.myAud.duration > 0) {
this.totalTime = this.toMinutesAndSeconds(this.myAud.duration)
}
})
this.myAud.addEventListener("timeupdate", () => {
if (this.myAud.duration > 0) {
this.currentTime = this.toMinutesAndSeconds(this.myAud.currentTime)
const progressDur = (this.myAud.currentTime / this.myAud.duration) * 100
progress.style.width = `${progressDur}%`
}
})
this.myAud.addEventListener("ended", () => {
this.isPlay = !this.isPlay
})
progress.addEventListener(
"click",
(e) => {
let x = e.offsetX / 370
let currentWidth = x * this.myAud.duration
this.myAud.currentTime = currentWidth
},
false
)
progressBar.addEventListener(
"click",
(e) => {
let x = e.offsetX / 370
let currentWidth = x * this.myAud.duration
this.myAud.currentTime = currentWidth
},
false
)
},
handleAudio() {
this.isPlay = !this.isPlay
if (!this.isPlay) {
this.myAud.play()
} else {
this.myAud.pause()
}
},
conversationDetailPage() {
conversationDetailPage({
batchId: this.detailObj.id,
currentPage: 1,
pageSize: 9999
}).then((res) => {
console.log(res)
this.dialogList = res.list
})
}
}
}
</script>
<style scoped lang="scss">
.dialogue {
margin: auto;
.record {
position: relative;
width: 600px;
margin: 20px auto;
height: 56px;
background: #f7f9fa;
border-radius: 32px;
display: flex;
align-items: center;
audio {
width: 600px;
height: 56px;
......@@ -65,25 +166,36 @@ export default {}
.play {
width: 24px;
height: 24px;
position: absolute;
top: 18px;
left: 18px;
margin: 0 20px 0 24px;
img {
width: 100%;
}
}
#progress-bar {
position: absolute;
top: 26px;
.trumpet {
width: 16px;
height: 16px;
margin-left: 24px;
img {
width: 100%;
}
}
.times {
font-size: 14px;
color: #666666;
min-width: 80px;
text-align: center;
margin-right: 19px;
}
#progressBar {
// position: absolute;
height: 6px;
width: 377px;
left: 134px;
width: 370px;
background-color: #e7e7e7; /* 进度条背景颜色 */
border-radius: 6px;
}
#progress {
width: 10%; /* 初始进度为0 */
width: 0; /* 初始进度为0 */
height: 6px;
background-image: linear-gradient(
90deg,
......@@ -94,16 +206,14 @@ export default {}
border-radius: 6px;
position: relative;
}
#progress::after {
content: ".";
display: block;
.circle {
width: 16px;
height: 16px;
background: #5850ff;
border: 4.5px solid #ffffff;
border-radius: 50%;
position: absolute;
right: 0;
right: -14px;
top: -4px;
box-sizing: border-box;
}
......@@ -178,6 +288,7 @@ export default {}
}
}
.abText {
margin-top: 14px;
width: 294px;
height: 472px;
padding: 12px;
......
......@@ -11,28 +11,30 @@
]"
@click="handleRangeClick"
@mouseleave="showClose = false"
@mousemove="showClose = true"
@mousemove="handleMove"
ref="reference"
>
<el-input
v-model="displayValue[0]"
v-model="userInput[0]"
:placeholder="startPlaceholder"
@blur="handleBlur"
@input="handleStartInput"
class="el-range-input"
@keydown="handleKeydown"
></el-input>
<span class="el-range-separator">至</span>
<el-input
v-model=" displayValue[1]"
v-model="userInput[1]"
:placeholder="endPlaceholder"
@input="handleEndInput"
@focus="handleFocus"
@blur="handleBlur"
class="el-range-input"
@keydown="handleKeydown"
></el-input>
<i
v-show="showClose"
v-show="showClose"
@click="handleClickIcon"
class="el-icon-circle-close"
></i>
......@@ -45,73 +47,66 @@ export default {
data() {
return {
pickerVisible: false,
showClose: false
showClose: false,
userInput: this.displayValue
}
},
props: {
displayValue: Array,
placeholder: String,
startPlaceholder: String,
endPlaceholder: String
},
watch: {
pickerVisible(val) {
// if (this.pickerDisabled) return
// if (val) {
// } else {
// this.hidePicker()
// this.emitChange(this.value)
// this.userInput = null
// if (this.validateEvent) {
// this.dispatch("ElFormItem", "el.form.blur")
// }
// this.$emit("blur", this)
// this.blur()
// }
displayValue(val) {
if (val) {
this.userInput = val
}
}
},
computed:{
displayValue(){
return []
},
},
methods: {
handleKeydown(){
handleStartInput(event) {
console.log(event)
if (this.userInput) {
this.userInput = [event, this.userInput[1]]
} else {
this.userInput = [event, null]
}
},
handleClickIcon(event) {
if (this.readonly || this.pickerDisabled) return
if (this.showClose) {
this.valueOnOpen = this.value
event.stopPropagation()
this.emitInput(null)
this.emitChange(null)
this.showClose = false
if (this.picker && typeof this.picker.handleClear === "function") {
this.picker.handleClear()
}
handleEndInput(event) {
if (this.userInput) {
this.userInput = [this.userInput[0], event]
} else {
this.pickerVisible = !this.pickerVisible
this.userInput = [null, event]
}
},
handleClickIcon(event) {
this.userInput[0]=null
this.userInput[1]=null
},
valueIsEmpty() {
const val = this.value
const val = this.userInput
if (Array.isArray(val)) {
for (let i = 0, len = val.length; i < len; i++) {
if (val[i]) {
return false
}
}
} else {
if (val) {
return false
}
}
return true
},
handleRangeClick() {
this.pickerVisible = true
},
handleMove() {
if (this.valueIsEmpty()) {
this.showClose = false
} else {
this.showClose = true
}
},
handleFocus() {
if (!this.pickerVisible) {
this.pickerVisible = true
......@@ -120,7 +115,16 @@ export default {
},
handleBlur() {
this.pickerVisible = false
console.log(this.pickerVisible)
this.contrastValue()
},
contrastValue() {
let val = this.userInput
if (Array.isArray(val)) {
if (val[0] > val[1]) {
val[1] =null
console.log(val)
}
}
}
}
}
......@@ -136,9 +140,9 @@ export default {
}
}
}
.el-icon-circle-close{
color:#DCDFE6;
margin-left:10px;
}
.el-icon-circle-close {
color: #dcdfe6;
margin-left: 10px;
}
}
</style>
\ No newline at end of file
......@@ -3,7 +3,10 @@
<div class="statistics">
<div class="s-item" v-for="(item, index) in sList" :key="index">
<div class="title">{{ item.text }}</div>
<div class="content">{{ item.value }}</div>
<div
class="content"
v-html="item.formatter && item.formatter(detailObj)"
></div>
</div>
</div>
<d2-search
......@@ -12,12 +15,44 @@
:search-form="searchForm"
:form-data="showFormData"
>
<div slot="score">
<div slot="firstClassify">
<el-select
v-model="searchForm.firstClassify"
clearable
placeholder="请选择"
@change="changeClassify"
>
<el-option
v-for="item in baseData.firstClassifyList"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</div>
<div slot="secondClassify">
<el-select
v-model="searchForm.secondClassify"
clearable
placeholder="请选择"
>
<el-option
v-for="item in baseData.secondClassifyList"
:key="item"
:label="item"
:value="item"
>
</el-option>
</el-select>
</div>
<template slot="score">
<el-input-range
start-placeholder="请输入"
end-placeholder="请输入"
:displayValue="searchForm.qualityTestScore"
></el-input-range>
</div>
</template>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
......@@ -27,75 +62,107 @@
</div>
<div class="theader">
<div class="title">话术列表</div>
<el-radio-group v-model="select">
<el-radio-button label="全部"></el-radio-button>
<el-radio-button label="命中"></el-radio-button>
<el-radio-button label="未命中"></el-radio-button>
<el-radio-group v-model="searchForm.hitResult">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="1">命中</el-radio-button>
<el-radio-button label="2">未命中</el-radio-button>
</el-radio-group>
</div>
<d2-table
ref="recordTable"
ref="analyseTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
:selectable-fn="selectableFn"
>
<template slot="hitResult" slot-scope="scope">
<div :class="['tag', scope.scope.hitResult == 1 ? 'gre' : 'red']">
{{ scope.scope.hitResult == 1 ? "是" : "否" }}
</div>
</template>
</d2-table>
</div>
</template>
<script>
import ElInputRange from "./el-input-range"
import { waitinputorderPage } from "@api/order"
import { Util, deepClone } from "@/common/util"
import { conversationCheckList, getPointCategory } from "@api/resident"
export default {
components: {
ElInputRange
},
props: {
detailObj: {
type: Object,
default: {}
}
},
data() {
return {
sList: [
{
text: "话术评分",
value: "80分"
formatter: (data) => {
return `<span style="font-weight:700;font-size:26px;">${
data.averageQualityTestScore ? data.score : "0"
}</span>分`
}
},
{
text: "预计营销结果",
value: "成交"
formatter: (data) => {
return `<span style="font-weight:700;font-size:26px;">${
data.estimatedResult ? data.estimatedResult : "--"
}</span>`
}
},
{
text: "开始录音时间",
value: "12:30"
formatter: (data) => {
return `<span style="font-weight:700;font-size:20px;">${
data.startTime ? data.startTime : "--"
}</span>`
}
},
{
text: "对话时长",
value: "1小时21分钟"
formatter: (data) => {
return `<span style="font-weight:700;font-size:26px;">${
this.toMinutesAndSeconds(data.duration).h
}</span>小时
<span style="font-weight:700;font-size:26px;">${
this.toMinutesAndSeconds(data.duration).m
}</span>分钟
`
}
}
],
searchForm: {},
searchForm: {
firstClassify: "",
secondClassify: "",
qualityTestScore: []
// hitResult: ""
},
searchFormSearch: {},
showFormData: [
{
label: "一级分类",
name: "orderDate",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions"
name: "firstClassify",
addHtml: "firstClassify"
},
{
label: "二级分类",
name: "merchantName",
type: "input",
maxlength: 20,
isClear: true,
keyFn: this.keyDowmGetList
name: "secondClassify",
addHtml: "secondClassify"
},
{
label: "质检评分",
name: "yqMerchantId",
name: "qualityTestScore",
addHtml: "score"
}
],
select: "全部",
getListApi: waitinputorderPage,
getListApi: conversationCheckList,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
......@@ -103,35 +170,102 @@ export default {
tableColumns: [
{
label: "一级分类",
prop: "tradeNo",
width: "160px"
prop: "firstClassify",
width: "120px"
},
{
label: "二级分类",
prop: "outTradeNo",
width: "250px"
prop: "secondClassify",
width: "140px"
},
{
label: "质检得分",
prop: "totalFee"
prop: "score",
width: "100px"
},
{
label: "是否命中",
prop: "accountDate",
width: "150px"
prop: "hitResult",
width: "100px",
addHtml: "hitResult"
},
{
label: "命中文本",
prop: "payType",
width: "100px"
prop: "hitText"
},
{
label: "话术建议",
prop: "posTrmNo"
prop: "suggestions"
}
]
},
baseData: {
firstClassifyList: [],
secondClassifyList: []
}
}
},
watch: {
"searchForm.hitResult"() {
this.$refs.analyseTable.refreshTable(true, true)
}
},
mounted() {
this.getPointCategory()
},
methods: {
toMinutesAndSeconds(hourse) {
const h = Math.floor(hourse / 60)
const m = parseInt(hourse % 60)
return {
h,
m
}
},
getPointCategory() {
this.classifyMap = new Map()
getPointCategory().then((res) => {
console.log(res)
this.baseData.firstClassifyList = Object.keys(res)
for (let item in res) {
this.classifyMap.set(item, res[item])
}
})
},
changeClassify() {
this.searchForm.secondClassify = ""
this.baseData.secondClassifyList = this.classifyMap.get(
this.searchForm.firstClassify
)
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.batchId = this.detailObj.id
if (this.searchFormSearch.qualityTestScore) {
this.searchFormSearch.qualityTestScoreBegin =
this.searchFormSearch.qualityTestScore[0]
this.searchFormSearch.qualityTestScoreEnd =
this.searchFormSearch.qualityTestScore[1]
}
delete this.searchFormSearch.qualityTestScore
resolve()
})
},
handleSearch() {
this.$refs.analyseTable.refreshTable(true, true)
},
handleReset() {
this.searchForm = {
firstClassify: "",
secondClassify: "",
qualityTestScore: [],
hitResult: ""
}
this.baseData.secondClassifyList = []
this.$refs.analyseTable.refreshTable()
}
}
}
</script>
......@@ -156,8 +290,6 @@ export default {
margin-bottom: 8px;
}
.content {
font-weight: 700;
font-size: 26px;
color: #333333;
}
}
......@@ -167,12 +299,29 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom:12px;
margin-bottom: 12px;
.title {
font-size: 16px;
color: #333333;
font-weight: 600;
}
}
.tag {
width: 30px;
height: 24px;
border-radius: 2px;
padding: 0 8px;
line-height: 24px;
box-sizing: border-box;
font-size: 14px;
}
.gre {
color: #2cca74;
background: #e9f9f1;
}
.red {
color: #eb4e4e;
background: #fdeded;
}
}
</style>
\ No newline at end of file
......@@ -10,12 +10,13 @@
<div>
<el-tabs v-model="activeName" @tab-click="handleReset">
<el-tab-pane label="质检分析" name="analyse">
<quality-analyse v-if="activeName == 'analyse'" ref="analyseList" />
<quality-analyse v-if="activeName == 'analyse'" v-bind="$attrs" ref="analyseList" />
</el-tab-pane>
<el-tab-pane label="对话详情" name="dialogue">
<dialogue-detail
v-if="activeName == 'dialogue'"
ref="dialogueDetail"
v-bind="$attrs"
/>
</el-tab-pane>
</el-tabs>
......@@ -28,7 +29,7 @@ import { Util, deepClone } from "@/common/util"
import { mapActions, mapState } from "vuex"
import { shopmallOrderList, relatedActivityOrder } from "@api/order"
import QualityAnalyse from "./qualityAnalyse"
import DialogueDetail from './dialogueDetail'
import DialogueDetail from "./dialogueDetail"
export default {
name: "RelatActivityOrderDialog",
components: {
......@@ -37,7 +38,7 @@ export default {
},
data() {
return {
activeName: "dialogue",
activeName: "analyse",
userInfo: this.$store.state.d2admin.user.info,
countObj: {},
searchForm: {
......@@ -187,19 +188,19 @@ export default {
isQualityVisible: {
type: Boolean,
default: false
},
orderId: {
type: [String, Number],
default: ""
}
},
computed: {},
mounted() {},
mounted() {
console.log(111,this.$attrs)
},
methods: {
handleReset() {},
handleClose() {}
handleClose() {
this.$emit("closeDialog", false)
}
}
}
</script>
......
......@@ -5,23 +5,23 @@
<div class="info-wrap">
<div class="info-item flex">
<label>员工:</label>
<span>陆可</span>
<span>{{ queryData.employeeName }}</span>
</div>
<div class="info-item flex">
<label>门店:</label>
<span>陆可</span>
<span>{{ queryData.storeList&&queryData.storeList.join("、") }}</span>
</div>
<div class="info-item flex">
<label>服务商:</label>
<span>陆可</span>
<span>{{ queryData.serviceList&&queryData.serviceList.join("、") }}</span>
</div>
<div class="info-item flex">
<label>质检日期:</label>
<span>陆可</span>
<span>{{ queryData.searchdate }}</span>
</div>
<div class="info-item flex">
<label>接待批次/批:</label>
<span>陆可</span>
<span>{{ queryData.batchNum }}</span>
</div>
</div>
</div>
......@@ -33,18 +33,13 @@
:search-form="searchForm"
:form-data="showFormData"
>
<div slot="score">
<template slot="score">
<el-input-range
start-placeholder="请输入"
end-placeholder="请输入"
:displayValue="searchForm.qualityTestScore"
></el-input-range>
</div>
<div slot="abnormal">
<el-input-range
start-placeholder="请输入"
end-placeholder="请输入"
></el-input-range>
</div>
</template>
</d2-search>
<div class="up-btns">
<el-button @click="handleSearch" size="small" type="primary">
......@@ -53,7 +48,7 @@
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
<d2-table
ref="qualityTable"
ref="recepDetail"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
......@@ -66,45 +61,49 @@
</template>
</d2-table>
</div>
<quality-detail :isQualityVisible="isQualityVisible"></quality-detail>
<quality-detail :isQualityVisible="isQualityVisible" v-if="isQualityVisible" :detailObj="detailObj" @closeDialog="closeDialog"></quality-detail>
</div>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import ElInputRange from "./el-input-range"
import QualityDetail from "./qualityDetail.vue"
import {
getyqMerchantList,
getMerchantGoodsStockMonthReport,
stockMonthReportCount
} from "@api/stockManage"
import { conversationPage } from "@api/resident"
export default {
data() {
return {
queryData: JSON.parse(this.$route.query.data),
isQualityVisible: false,
searchForm: {},
searchForm: {
recepTime: [],
qualityTestScore: [],
estimatedResultId: ""
},
detailObj:{},
searchFormSearch: {},
getListApi: getMerchantGoodsStockMonthReport,
getListApi: conversationPage,
showFormData: [
{
label: "接待时间",
type: "datePicker",
name: "recepTime",
// addHtml:'recepTime',
isClear: true,
pickerOptions: "rangePickerOptions"
},
{
label: "质检评分",
name: "yqMerchantId",
name: "qualityTestScore",
addHtml: "score"
},
{
label: "预计营销结果",
name: "yqMerchantId",
name: "estimatedResultId",
type: "select",
optionList: [],
optionId: "merchantNo",
optionLabel: "merchantName",
optionsName: "yqMerchantList"
optionId: "confId",
optionLabel: "confLabel",
optionsName: "estimatedResultList"
}
],
tableParams: {
......@@ -114,23 +113,39 @@ export default {
tableColumns: [
{
label: "开始接待时间",
prop: "upgradeGoodsName"
prop: "startTime"
},
{
label: "结束接待时间",
prop: "productCode"
prop: "endTime"
},
{
label: "录音时长/分钟",
prop: "goodsSeries"
prop: "duration"
},
{
label: "预计营销结果",
prop: "goodsTypeName"
prop: "estimatedResult"
},
{
label: "话术质检评分/分",
prop: "lastMonthRemainStock"
prop: "score"
}
]
},
baseData: {
estimatedResultList: [
{
confId: "1",
confLabel: "成交"
},
{
confId: "2",
confLabel: "战败"
},
{
confId: "3",
confLabel: "未知"
}
]
}
......@@ -140,9 +155,85 @@ export default {
ElInputRange,
QualityDetail
},
mounted() {
this.getOptionsList()
},
methods: {
qualitDetail() {
handleSearch() {
this.$refs.recepDetail.refreshTable(true, true)
},
handleReset() {
this.searchForm = {
recepTime: [],
qualityTestScore: [],
estimatedResultId: ""
}
this.$refs.recepDetail.refreshTable()
},
closeDialog(){
this.isQualityVisible = false
},
qualitDetail(row) {
this.detailObj=row
this.isQualityVisible = true
},
beforeSearchFn() {
return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm)
this.searchFormSearch.conversationDateId = this.queryData.id
this.searchFormSearch.pageNum= this.searchFormSearch.currentPage
if (this.searchFormSearch.qualityTestScore) {
this.searchFormSearch.qualityTestScoreBegin =
this.searchFormSearch.qualityTestScore[0]
this.searchFormSearch.qualityTestScoreEnd =
this.searchFormSearch.qualityTestScore[1]
}
if (this.searchFormSearch.recepTime.length>0) {
this.searchFormSearch.startTime = Util.dateFormate(
this.searchFormSearch.recepTime[0],
"YYYY-MM-DD HH:mm:ss"
)
this.searchFormSearch.endTime =
Util.dateFormate(this.searchFormSearch.recepTime[1], "YYYY-MM-DD") +
" 23:59:59"
}
if (this.searchFormSearch.estimatedResult) {
this.searchFormSearch.estimatedResult =
this.baseData.estimatedResultList.find(
(item) => item.confId == this.searchFormSearch.estimatedResultId
).confLabel
}
delete this.searchFormSearch.qualityTestScore
delete this.searchFormSearch.recepTime
delete this.searchFormSearch.estimatedResultId
delete this.searchFormSearch.currentPage
resolve()
})
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
}
}
}
......@@ -171,6 +262,8 @@ export default {
.info-item {
width: 50%;
margin-bottom: 20px;
display: flex;
align-items: flex-start;
label {
width: 154px;
text-align: right;
......@@ -181,6 +274,14 @@ export default {
span {
font-size: 14px;
color: #1d1d1d;
display: inline-block;
max-width: 300px;
overflow: hidden;
/* 防止文本换行 */
white-space: nowrap;
/* 使用省略号表示被截断的文本 */
text-overflow: ellipsis;
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!