Commit 5ce10f3e by 前端

质检优化

1 parent f4362e08
......@@ -8,6 +8,16 @@ export function getReclistWithPage(data) {
data.method = `${path}badge.employeeBadgeReclistWithPage`
return request(data, "post")
}
// 质检统计
export function receptionStaffStatic(data) {
data.method = `${path}badge.receptionStaffStatic`
return request(data, "post")
}
// 安心包明细
export function findAxbByBatchId(data) {
data.method = `${path2}inspection.defence.findAxbByBatchId`
return request(data, "post")
}
// 分页查询接待批次列表
export function conversationPage(data) {
......
......@@ -52,7 +52,7 @@
>恢复门店上架此专区</span
>
</div>
<div class="child-tab">
<div class="child-tab" v-if="sIndex != 3">
<div class="add-tab" v-if="sItem.length != 20">
<el-button
size="small"
......@@ -95,18 +95,25 @@
>
<tr>
<th>序号</th>
<th v-if="isShowBand(sIndex, sub)">
<span class="required">*</span>品牌
<i
class="el-icon-edit-outline"
v-if="configType == 0"
@click="handleEditBrand(sub.infoList)"
></i>
</th>
<th><span class="required">*</span>车型展示图</th>
<th><span class="required">*</span>选购卡名称</th>
<th><span class="required">*</span>选购卡描述</th>
<th><span class="required">*</span>详图</th>
<template v-if="sIndex != 3">
<th v-if="isShowBand(sIndex, sub)">
<span class="required">*</span>品牌
<i
class="el-icon-edit-outline"
v-if="configType == 0"
@click="handleEditBrand(sub.infoList)"
></i>
</th>
<th><span class="required">*</span>车型展示图</th>
<th><span class="required">*</span>选购卡名称</th>
<th><span class="required">*</span>选购卡描述</th>
<th><span class="required">*</span>详图</th>
</template>
<template v-else>
<th><span class="required">*</span>产品名称</th>
<th><span class="required">*</span>质保</th>
<th><span class="required">*</span>售价</th>
</template>
<th>操作</th>
</tr>
<tr v-for="(pItem, pindex) in sub.infoList">
......@@ -206,6 +213,66 @@
</Tab-pane>
</Tabs>
</div>
<div class="child-tab" v-else>
<table
cellspacing="0"
cellpadding="0"
border="0"
class="table-box"
>
<tr>
<th>序号</th>
<th><span class="required">*</span>产品名称</th>
<th><span class="required">*</span>质保</th>
<th><span class="required">*</span>售价</th>
<th>操作</th>
</tr>
<tr v-for="(pItem, pindex) in sItem">
<td>{{ pindex + 1 }}</td>
<td>
<el-input
v-model="pItem.name"
maxlength="50"
placeholder="请输入产品名称"
></el-input>
</td>
<td>
<el-input
v-model="pItem.price"
maxlength="50"
placeholder="请输入质保"
></el-input>
</td>
<td>
<el-input
v-model="pItem.warranty"
maxlength="50"
placeholder="请输入售价"
></el-input>
</td>
<td>
<el-button
type="text"
v-if="
pindex == sItem.length - 1 &&
pindex < PACKAGE[sIndex + 1].maxNum - 1
"
@click="handleAdd(sItem, pindex)"
>
新增一行
</el-button>
<el-button
:disabled="getDisabled(sIndex)"
type="text"
v-if="sItem.length != 1"
@click="handleDel(sItem, pindex)"
>
删除此项
</el-button>
</td>
</tr>
</table>
</div>
</div>
<div class="tab-content">
<div class="tab-header">
......@@ -424,6 +491,11 @@ const PACKAGE = {
tips: "每个类目最大支持上传20个产品",
name: "精品专区",
maxNum: 20
},
4: {
tips: "最大新增20个",
name: "选装清单",
maxNum: 20
}
}
const imgSrc = [
......@@ -644,7 +716,12 @@ export default {
this.configInfo = res.materials
this.caseInfo = res.cases
this.configInfo.forEach((item) => {
this.$set(item, "subItem", [item.packages, item.films, item.products])
this.$set(item, "subItem", [
item.packages,
item.films,
item.products,
item.optionals
])
})
this.caseName = this.caseInfo[0].category
this.packageName = this.configInfo[0].carModelName
......@@ -825,7 +902,8 @@ export default {
let packageList = {
packageInfoList: [],
filmInfoList: [],
productInfoList: []
productInfoList: [],
optionalInfoList: []
}
/**
* infoList[]转为packageInfoList:[],productInfoList:[],filmInfoList:[]
......@@ -833,7 +911,16 @@ export default {
const keys = Object.keys(packageList)
this.configInfo.forEach((i) => {
i.subItem.forEach((sub, k) => {
sub.forEach((info) => {
console.log(sub)
if (!sub) return
sub.forEach((info, i) => {
if (k == 3) {
if (!this.validateForm(sub, i)) {
throw new Error("请完善信息")
}
console.log(sub, "info.infoList")
return
}
info.infoList.forEach((d, dIndex) => {
if (k == 0 && !this.isUpStatus) {
} else {
......@@ -846,8 +933,12 @@ export default {
})
packageList[keys[k]].push(...info.infoList)
})
if (k == 3) {
packageList[keys[k]].push(...sub)
}
})
})
console.log(packageList)
const { merchantId, merchantName, id } = this.$route.query
return {
id,
......@@ -871,15 +962,24 @@ export default {
})
},
validateForm(item, i, type = 0) {
const validateList = {
const keys = Object.keys(item[i])
let validateList = {
modelDisplayPicurl: "请上传车型展示图",
name: ["请输入选购卡名称", "请输入素材名称"],
description: "请输入选购卡描述",
detailPicurl: "请上传详图",
thumbnailUrl: "请上传缩略图",
materialUrl: "请上传视频或者图片"
price: "请输入价格",
materialUrl: "请上传视频或者图片",
warranty: "请输入质保价"
}
if (keys.includes("warranty")) {
validateList = {
name: "请输入名称",
price: "请输入价格",
warranty: "请输入质保价"
}
}
const keys = Object.keys(item[i])
const { carModelId, carModelName, category } = item[i]
let obj = {
category
......
<template>
<div class="analyse" v-loading="loading">
<el-tabs v-model="activeName" >
<el-tabs v-model="activeName">
<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-tabs>
<template v-if="activeName === 'first'">
<d2-search
......@@ -65,7 +66,7 @@
</el-radio-group>
</div>
<d2-table
class="table-wrap"
class="table-wrap"
ref="analyseTable"
:search-form="searchFormSearch"
:table-params="tableParams"
......@@ -117,15 +118,47 @@
</template>
</d2-table>
</template>
<template v-else>
<template v-else-if="activeName === 'second'">
<attack-detail :detailObj="detailObj" />
</template>
<template v-else>
<d2-table
class="table-wrap"
ref="analyseTable"
:table-params="openTableParams"
:hasPage="false"
:table-data="analyseOpen"
noDataText="暂无开口明细"
:noDataImg="noDataImg"
height="100%"
>
<div slot="mentionedTime" class="open-time" slot-scope="scope">
{{ scope.scope.mentionedTime }}
<img src="@/assets/open-time.png" />
</div>
<template slot="mentionedContext" slot-scope="scope">
<el-tooltip
v-if="scope.scope.mentionedContext"
effect="light"
placement="top"
>
<div slot="content">{{ scope.scope.mentionedContext }}</div>
<div class="one-line">{{ scope.scope.mentionedContext }}</div>
</el-tooltip>
<div v-else>--</div>
</template>
</d2-table>
</template>
</div>
</template>
<script>
import ElInputRange from "../el-input-range"
import { Util, deepClone } from "@/common/util"
import { conversationCheckList, getPointCategory } from "@api/resident"
import {
conversationCheckList,
getPointCategory,
findAxbByBatchId
} from "@api/resident"
import noDataImg from "@/assets/empty-2.png"
import AttackDetail from "./attackDetail"
export default {
......@@ -144,6 +177,7 @@ export default {
activeName: "first",
noDataImg,
analyseList: [],
analyseOpen: [],
spanArr1: [],
spanIndex1: 0,
searchForm: {
......@@ -212,6 +246,25 @@ export default {
}
]
},
openTableParams: {
tableOption: false,
tableColumns: [
{
label: "开口时间",
prop: "mentionedTime",
addHtml: "mentionedTime"
},
{
label: "开口类型",
prop: "mentionedType"
},
{
label: "开口内容",
prop: "mentionedContext",
addHtml: "mentionedContext"
}
]
},
baseData: {
firstClassifyList: [],
secondClassifyList: []
......@@ -228,8 +281,14 @@ export default {
this.$refs.analyseTable.tableHeightValues = "100%"
// this.getPointCategory()
this.getList()
this.findAxbByBatchId()
},
methods: {
findAxbByBatchId() {
findAxbByBatchId({ batchId: this.detailObj.id }).then((res) => {
this.analyseOpen = res || []
})
},
async getList() {
this.loading = true
try {
......@@ -398,8 +457,8 @@ export default {
font-weight: 600;
}
}
.table-wrap{
height:calc(100% - 150px);
.table-wrap {
height: calc(100% - 150px);
// overflow-y: auto;
}
.up-btns {
......@@ -435,4 +494,16 @@ export default {
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
</style>
\ No newline at end of file
.open-time {
img {
width: 16px;
height: 16px;
vertical-align: middle;
}
}
.one-line {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
......@@ -39,6 +39,14 @@
</div>
</div>
<div class="d2-container-content">
<div class="view-panel">
<div class="view-item" v-for="(item, index) in viewList" :key="index">
<div class="view-item-label">{{ item.label }}</div>
<div class="view-item-value" :style="{ color: item.color }">
{{ staffStatic[item.value] || "-" }}
</div>
</div>
</div>
<div class="d2-container-title">
质检管理
<div class="btns">
......@@ -164,7 +172,11 @@ import ElInputRange from "../el-input-range"
import { listShop4sByRef } from "@api/merchant"
import { getList } from "@api/serviceManage"
import { getReclistWithPage, exportReclistList } from "@api/resident"
import {
getReclistWithPage,
exportReclistList,
receptionStaffStatic
} from "@api/resident"
import VoiceDialog from "./VoiceDialog"
import dayjs from "dayjs"
export default {
......@@ -174,6 +186,58 @@ export default {
},
data() {
return {
viewList: [
{
label: "接待数",
color: "#185EFE",
value: "totalVisits"
},
{
label: "成交数",
color: "#27CD5A",
value: "successfulConversions"
},
{
label: "转化率",
color: "#F47F13",
value: "conversionRate"
},
{
label: "转化率(非企业)",
color: "#F47F13",
value: "nonCorporateConversionRate"
},
{
label: "转化率(企业)",
color: "#F47F13",
value: "corporateConversionRate"
},
{
label: "安心包开口数",
color: "#185EFE",
value: "mentionedPackages"
},
{
label: "安心包开口率",
color: "#27CD5A",
value: "packageMentionRate"
},
{
label: "安心包成交率",
color: "#F47F13",
value: "packageConversionRate"
},
{
label: "安心包成交率(非企业)",
color: "#F47F13",
value: "nonCorporatePackageConversionRate"
},
{
label: "安心包成交率(企业)",
color: "#F47F13",
value: "corporatePackageConversionRate"
}
],
showFormData: [
{
label: "接待日期",
......@@ -267,6 +331,40 @@ export default {
prop: "num",
width: "50px"
},
{ label: "成交数", name: "successfulConversions", width: "80px" },
{
label: "转化率",
name: "conversionRate",
width: "80px"
},
{
label: "转化率(非企业)",
name: "nonCorporateConversionRate",
width: "120px"
},
{
label: "转化率(企业)",
name: "corporateConversionRate",
width: "120px"
},
{ label: "安心包开口数", name: "mentionedPackages", width: "120px" },
{ label: "安心包开口率", name: "packageMentionRate", width: "120px" },
{
label: "安心包成交率",
name: "packageConversionRate",
width: "120px"
},
{
label: "安心包成交率(非企业)",
name: "nonCorporatePackageConversionRate",
width: "160px"
},
{
label: "安心包成交率(企业)",
name: "corporatePackageConversionRate",
width: "150px"
},
{
label: "接待日期",
prop: "searchdate",
......@@ -470,6 +568,7 @@ export default {
}
]
},
staffStatic: {},
voiceVisible: false,
spanArr1: [],
spanIndex1: 0,
......@@ -488,6 +587,7 @@ export default {
this.getOptionsList()
this.getServiceStore()
this.getSaasList()
this.receptionStaffStatic()
},
methods: {
getSaasList() {
......@@ -496,7 +596,7 @@ export default {
currentPage: 1
}).then((res) => {
this.baseData.parkServiceList = res.list
this.getOptionsList(true,'parkServiceList')
this.getOptionsList(true, "parkServiceList")
})
},
getServiceStore(merchantId) {
......@@ -504,7 +604,12 @@ export default {
yqMerchantId: merchantId
}).then((res) => {
this.baseData.storeIdList = res || []
this.getOptionsList(true,'storeIdList')
this.getOptionsList(true, "storeIdList")
})
},
receptionStaffStatic() {
receptionStaffStatic(this.searchFormSearch).then((res) => {
this.staffStatic = res
})
},
recepDetail(row) {
......@@ -579,10 +684,10 @@ export default {
resolve()
})
},
getOptionsList(isAll,optionsName) {
getOptionsList(isAll, optionsName) {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
if (isAll&&item.optionsName==optionsName) {
if (isAll && item.optionsName == optionsName) {
if (
this.baseData[item.optionsName]?.length &&
this.baseData[item.optionsName][0][
......@@ -603,7 +708,6 @@ export default {
)
}
})
},
handleSearch() {
if (
......@@ -618,6 +722,7 @@ export default {
}
this.$refs.qualityTable.page.currentPage = 1
this.getTableList()
this.receptionStaffStatic()
},
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
......@@ -788,6 +893,26 @@ export default {
position: relative;
width: 100%;
height: 100%;
.view-panel {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 16px 12px;
margin-bottom: 20px;
.view-item {
padding: 16px 20px;
background: #f8faff;
border-radius: 5px;
&-label {
font-size: 14px;
color: #333333;
}
&-value {
line-height: 36px;
font-size: 24px;
font-weight: 700;
}
}
}
::v-deep.d2-container-full {
left: 16px !important;
right: 0 !important;
......
......@@ -97,10 +97,7 @@
</template>
<template v-else>-</template>
</div>
<div
slot="estimatedResult"
slot-scope="scope"
>
<div slot="estimatedResult" slot-scope="scope">
<div
v-if="scope.scope.bussinessType != 2"
:class="['tag', setTagColor(scope.scope.estimatedResult)]"
......@@ -264,13 +261,27 @@ export default {
addHtml: "durationHtml"
},
{
label: "安心包是否开口",
prop: "axbOpenFlag",
formatter(row) {
return row.axbOpenFlag ? "是" : "否"
}
},
{
label: "安心包是否成交",
prop: "isFinishFlag",
formatter(row) {
return row.finishFlag ? "是" : "否"
}
},
{
label: "开始接待时间",
prop: "startTime"
},
{
label: "结束接待时间",
prop: "endTime"
}
}
]
},
baseData: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!