Commit 8796ba4f by 张立顺

Merge branch 'develop' into SAAS+V4.40.0-0624

2 parents 5bb8226f cbe42a28
<!-- 发券宝 -->
<template>
<d2-container class="coupons">
<div class="header"
slot="header">
<d2-search ref="showSearch"
class="show-search"
:search-form="parentSearchForm"
:form-data="copyShowFormData" />
<div class="header" slot="header">
<d2-search
ref="showSearch"
class="show-search"
:search-form="parentSearchForm"
:form-data="copyShowFormData"
/>
<div class="up-btns">
<el-button size="small"
type="primary"
@click="handleSearch">
<el-button size="small" type="primary" @click="handleSearch">
查询
</el-button>
<el-button size="small"
@click="handleReset">
重置
</el-button>
<el-button size="small" @click="handleReset"> 重置 </el-button>
</div>
</div>
<div class="d2-container-content"
style="position: positive;">
<span style="position: absolute; right: 41px; top: 42px; z-index: 999;">
<auth-button :show-btn-ids="activeName === 'storeList' ? ['9030601', '9030605'] : ['9030605']"
category="Button" />
<div class="d2-container-content" style="position: positive">
<span style="position: absolute; right: 41px; top: 42px; z-index: 999">
<auth-button
:show-btn-ids="
activeName === 'storeList' ? ['9030601', '9030605'] : ['9030605']
"
category="Button"
/>
</span>
<el-tabs v-model="activeName"
type="card"
@tab-click="handleReset">
<el-tab-pane label="店面列表"
name="storeList">
<store-list v-if="activeName == 'storeList'" ref="storeList"
:parent-search-form="parentSearchForm" />
<el-tabs v-model="activeName" type="card" @tab-click="handleReset">
<el-tab-pane label="店面列表" name="storeList">
<store-list
v-if="activeName == 'storeList'"
ref="storeList"
:parent-search-form="parentSearchForm"
/>
</el-tab-pane>
<el-tab-pane label="领用明细"
name="couponsDetail">
<coupons-detail v-if="activeName == 'couponsDetail'" ref="couponsDetail"
:parent-search-form="parentSearchForm" />
<el-tab-pane label="领用明细" name="couponsDetail">
<coupons-detail
v-if="activeName == 'couponsDetail'"
ref="couponsDetail"
:parent-search-form="parentSearchForm"
/>
</el-tab-pane>
</el-tabs>
</div>
<edit-coupons-dialog :coupons-visible="couponsVisible"
@couponClose="couponClose" />
<edit-coupons-dialog
:coupons-visible="couponsVisible"
@couponClose="couponClose"
/>
</d2-container>
</template>
......@@ -50,9 +53,9 @@ import storeList from './storeList'
import couponsDetail from './couponsDetail'
import editCouponsDialog from './editCouponsDialog'
// import { exportListApi, exportDetailListApi } from '@api/coupons'
import { asyncExportExcel } from '@api/sys.base'
// import { asyncExportExcel } from '@api/sys.base'
import { getDistinctColum } from '@api/coupons'
import { deepClone } from "@/common/util"
import { Util, deepClone } from '@/common/util'
import { BaseData } from '@/common/constants.js'
import { mapActions, mapState } from 'vuex'
export default {
......@@ -255,6 +258,8 @@ export default {
var params = {
...this.parentSearchForm,
startDate: this.parentSearchForm.useTime && this.parentSearchForm.useTime.length ? Util.dateFormate(this.parentSearchForm.useTime[0], 'YYYY-MM-DD HH:mm:ss') : '',
endDate: this.parentSearchForm.useTime && this.parentSearchForm.useTime.length ? Util.dateFormate(this.parentSearchForm.useTime[1], 'YYYY-MM-DD') + ' 23:59:59' : '',
currentPage: 1,
method: method
}
......
......@@ -65,10 +65,7 @@
v-if="item.role % 2 === 1"
/>
</div>
<div
class="dig-content"
@click="currentDialog(item.mergedOffset)"
>
<div class="dig-content" @click="currentDialog(item)">
{{ item.content }}
</div>
</div>
......@@ -257,13 +254,15 @@ export default {
.record-box {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 10px;
.copy-btn {
margin-left: auto;
margin-left: 10px;
font-size: 14px;
color: #2a58ad;
display: flex;
align-items: center;
flex-shrink: 0;
cursor: pointer;
.icon {
width: 16px;
......
......@@ -108,8 +108,17 @@ export default {
key: "carModel"
},
{
label: "业务场景",
key: "bussinessType",
formatter(row) {
let result = { 1: "延保", 2: "轻改" }[row.bussinessType]
return result || "-"
}
},
{
label: "APP接待结果",
formatter(row) {
// if (row.bussinessType == 2) return "-"
const val = {
1: "成交",
0: "战败"
......@@ -118,7 +127,7 @@ export default {
1: "#2CCA74",
0: "#EB4E4E"
}[row.receptionStatus]
return `<span style="font-size:22px;color:${color}">${
return `<span style="font-size:20px;color:${color}">${
val || "-"
}</span>`
}
......@@ -126,34 +135,32 @@ export default {
{
label: "预计营销结果",
formatter(row) {
if (row.bussinessType == 2) return "-"
const color =
{
成交: "#2CCA74",
战败: "#EB4E4E"
}[row.estimatedResult] || "#999999"
return `<span style="font-size:22px;color:${color}">${
return `<span style="font-size:20px;color:${color}">${
row.estimatedResult || "分析中"
}</span>`
}
},
{
label: "质检得分",
label: "话术评分",
formatter(row) {
if (row.bussinessType == 2) return "-"
return row.score != null
? `<div class="num">${row.score}<span class="unit">分</span></div>`
: `<span style="font-size:22px;color:#999">分析中</span>`
: `<span style="font-size:20px;color:#999">分析中</span>`
}
},
{
label: "攻防得分",
label: "接待时长",
formatter(row) {
return row.defence === 2
? `<div class="num">${row.defencePoint}<span class="unit">分</span></div>`
: row.defence === 1 || row.defence === 0 || row.defence === 4
? `<span style="font-size:22px;color:#999">分析中</span>`
: row.defence === 3
? `<span style="font-size:22px;color:#999">未发现攻防</span>`
: `<span style="font-size:22px;color:#999">-</span>`
return `<div class="num">${
row.duration ? toMinutesAndSeconds(row.duration) : "-"
}</div>`
}
}
],
......@@ -227,7 +234,7 @@ export default {
padding: 20px;
justify-content: space-between;
&-item {
width: calc((100% - 40px) / 6);
width: calc((100% - 40px) / 7);
background: #f7f9fa;
border-radius: 4px;
box-sizing: border-box;
......@@ -254,6 +261,7 @@ export default {
font-weight: 400;
font-size: 14px;
color: #333333;
margin: 0 2px;
}
}
}
......@@ -294,4 +302,3 @@ export default {
}
}
</style>
......@@ -89,10 +89,13 @@
<template v-else>--</template>
</div>
<div slot="scoreHtml" slot-scope="scope">
<template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }}
<template v-if="scope.scope.bussinessType != 2">
<template v-if="scope.scope.score || scope.scope.score === 0">
{{ scope.scope.score }}
</template>
<template v-else>分析中</template>
</template>
<template v-else>分析中</template>
<template v-else>-</template>
</div>
<div
slot="estimatedResult"
......@@ -106,13 +109,26 @@
: 'grayBg'
]"
>
{{ scope.scope.estimatedResult }}
<div
v-if="scope.scope.bussinessType != 2"
:class="['tag', setTagColor(scope.scope.estimatedResult)]"
>
{{ scope.scope.estimatedResult }}
</div>
<div v-else></div>
</div>
<div slot="defencePoint" slot-scope="scope">
<template v-if="scope.scope.defence === 2">{{
scope.scope.defencePoint?scope.scope.defencePoint:'-'
scope.scope.defencePoint ? scope.scope.defencePoint : "-"
}}</template>
<template v-else-if="scope.scope.defence === 1||scope.scope.defence === 0||scope.scope.defence === 4">分析中</template>
<template
v-else-if="
scope.scope.defence === 1 ||
scope.scope.defence === 0 ||
scope.scope.defence === 4
"
>分析中</template
>
<template v-else-if="scope.scope.defence === 3"
>未发现攻防</template
>
......@@ -120,9 +136,18 @@
</div>
<div slot="customerTypeName" slot-scope="scope">
<template v-if="scope.scope.defence === 2">{{
scope.scope.customerTypeName?scope.scope.customerTypeName:'-'
scope.scope.customerTypeName
? scope.scope.customerTypeName
: "-"
}}</template>
<template v-else-if="scope.scope.defence === 1||scope.scope.defence === 0||scope.scope.defence === 4">分析中</template>
<template
v-else-if="
scope.scope.defence === 1 ||
scope.scope.defence === 0 ||
scope.scope.defence === 4
"
>分析中</template
>
<template v-else-if="scope.scope.defence === 3">未知</template>
<template v-else>-</template>
</div>
......@@ -204,12 +229,21 @@ export default {
prop: "carModel"
},
{
label: "业务场景",
prop: "bussinessType",
formatter(row) {
let result = { 1: "延保", 2: "轻改" }[row.bussinessType]
return result || "-"
}
},
{
label: "APP接待结果",
formatter(row) {
return {
let result = {
1: "成交",
0: "战败"
}[row.receptionStatus]
return result || "-"
}
},
{
......@@ -370,8 +404,9 @@ export default {
})
},
setTableFinishFun(data) {
let { page } = this.$refs.recepDetail
for (let i = 0; i < data.length; i++) {
data[i].key = i + 1
data[i].key = i + 1 + page.pageSize * (page.currentPage - 1)
}
},
getOptionsList() {
......@@ -395,6 +430,16 @@ export default {
)
}
})
},
setTagColor(estimatedResult) {
switch (estimatedResult) {
case "成交":
return "greenBg"
case "战败":
return "redBg"
default:
return "grayBg"
}
}
}
}
......
......@@ -96,12 +96,12 @@ export default {
},
// 在beforeDestroy钩子中移除事件监听
beforeDestroy () {
// window.removeEventListener('popstate', this.preventBack)
window.removeEventListener('popstate', this.preventBack)
},
// 在你的Vue组件的mounted钩子中添加事件监听
mounted () {
// history.pushState(null, null, document.URL)
// window.addEventListener('popstate', this.preventBack)
history.pushState(null, null, document.URL)
window.addEventListener('popstate', this.preventBack)
if (this.tabboxWidth == 0) this.tabboxWidth = this.$refs.tabbox.offsetWidth
},
methods: {
......@@ -110,8 +110,6 @@ export default {
const [recep] = this.$refs[`recep-${this.windowId}`]
if (recep && recep.isQualityVisible) recep.isQualityVisible = false
else this.windowId = -1
console.log(recep)
// this.windowId = -1
history.pushState(null, null, document.URL)
} else this.$router.go(-1)
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!