Commit a8908da6 by wangzhihui

话术违规与店面配置

1 parent 9fb5b53d
......@@ -12,11 +12,20 @@
<template v-for="(item, index) in configData">
<el-col :span="item.col ? item.col : 12" :key="index">
<el-form-item :label="item.title">
<slot
v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
/>
<div v-if="item.addHtml">
<template v-if="item.addHtml == 'resultArr'">
<template v-if="detailInfo[item.addHtml]">
<p
v-for="(item, index) in detailInfo[item.addHtml]"
:key="index"
>
{{ item.str }}
</p>
</template>
<span v-else>-</span>
</template>
</div>
<div v-else>
<div
v-if="item.className"
......@@ -51,17 +60,17 @@
<div class="operate m40">
操作人:{{
detailInfo.recordingBatchModelCallWghs.wghsStatus == 1
? ""
? "-"
: detailInfo.recordingBatchModelCallWghs
.violationReasonPersionName
.violationReasonPersionName || "-"
}}
</div>
<div class="time m40">
操作时间:{{
detailInfo.recordingBatchModelCallWghs.wghsStatus == 1
? ""
? "-"
: detailInfo.recordingBatchModelCallWghs
.violationReasonPersionName
.violationReasonConfimTime || "-"
}}
</div>
<div class="reason m40">
......@@ -69,8 +78,9 @@
<div>
{{
detailInfo.recordingBatchModelCallWghs.wghsStatus == 1
? "你在以上的接待记录中,存在过度承诺现象,这极易引发客户纠纷,损害公司信誉。请严格依据公司政策与产品实际情况介绍,切勿做出无法兑现的承诺。因本次违规已扣除本月行为类-行为异常积分,后续将加强监管,违规者将严肃处理。当购车者车辆出现问题,依据商家“任何小毛病都免费修”的承诺前往维修,却发现不在质保范围内需自费维修时,会产生经济上的落差与困扰。这不仅增加维修成本,还可能因与商家的售后纠纷,耗费大量时间与精力去沟通协调。"
: detailInfo.recordingBatchModelCallWghs.violationReason
? "-"
: detailInfo.recordingBatchModelCallWghs.violationReason ||
"-"
}}
</div>
</div>
......@@ -210,8 +220,9 @@ export default {
},
{
title: "违规判断依据:",
key: "sourceContent",
col: 24
key: "resultArr",
col: 24,
addHtml: "resultArr"
}
],
dialogConfig: {
......@@ -236,7 +247,30 @@ export default {
getDetail() {
findViolationByBatchId({ batchId: this.id }).then((res) => {
if (res) {
res.scene = res.scene == 1 ? "精品" : "延保"
res.recordingBatchModelCallWghs.violationReasonConfimTime = res
.recordingBatchModelCallWghs.violationReasonConfimTime
? Util.dateFormate(
res.recordingBatchModelCallWghs.violationReasonConfimTime,
"YYYY-MM-DD HH:mm:ss"
)
: "-"
let resultArr = res.recordingBatchModelCallWghs.resultJson
? JSON.parse(res.recordingBatchModelCallWghs.resultJson)
: ""
if (resultArr) {
resultArr.filter((item) => {
return item.rule != "R104"
})
resultArr.forEach((item, index) => {
let str = ""
str += `${item.sentence}(${item.reason}${
item.g1_reason ? "&" + item.g1_reason : ""
}${item.g2_reason ? "&" + item.g2_reason : ""})`
item.str = str
})
res.resultArr = resultArr
}
this.detailInfo = res
}
......@@ -332,4 +366,7 @@ export default {
justify-content: center;
margin-top: 20px;
}
.audio {
color: #2a58ad;
}
</style>
......@@ -70,6 +70,15 @@
>
</el-popover>
</template>
<template slot="fileUrl" slot-scope="scope">
<div
class="audio"
@click="play(scope.scope.fileUrl)"
v-if="scope.scope.fileUrl"
>
{{ scope.scope.fileUrl }}
</div>
</template>
<div slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleDetail(scope.scope)"
>详情</el-button
......@@ -121,6 +130,7 @@ export default {
],
searchFormSearch: {},
searchForm: {
bussinessType: "",
customerName: "",
dateTime: [],
staffName: "",
......@@ -163,7 +173,8 @@ export default {
},
{
label: "录音链接",
prop: "fileUrl"
// prop: "fileUrl"
addHtml: "fileUrl"
},
{
label: "客户车型",
......@@ -241,7 +252,6 @@ export default {
label: "门店",
name: "merchantNo",
type: "select",
// multiple: true,
isClear: true,
collapseTags: true,
optionList: [],
......@@ -256,6 +266,18 @@ export default {
isClear: true
},
{
label: "业务场景",
name: "bussinessType",
type: "select",
isClear: true,
optionList: [
{ confId: 0, confLabel: "会员权益/升级" },
{ confId: 1, confLabel: "精品升级" }
],
optionId: "confId",
optionLabel: "confLabel"
},
{
label: "客户",
name: "customerName",
type: "input",
......@@ -351,21 +373,24 @@ export default {
let [startDateTime, endDateTime] = this.searchForm.dateTime
this.searchFormSearch.startDateTime = Util.dateFormate(
startDateTime,
"YYYY-MM-DD HH:mm:ss"
"YYYY-MM-DD"
)
this.searchFormSearch.endDateTime = Util.dateFormate(
endDateTime,
"YYYY-MM-DD HH:mm:ss"
"YYYY-MM-DD"
)
}
delete this.searchFormSearch.dateTime
resolve()
})
},
play(url) {
window.open(url)
},
async exportTable() {
try {
await this.beforeSearchFn()
const res = await sceneExport({
const res = await findViolationReceptionByConditionExport({
...this.searchFormSearch
})
if (res) window.open(res)
......@@ -418,4 +443,9 @@ export default {
}
}
}
.audio {
color: #2a58ad;
font-size: 14px;
cursor: pointer;
}
</style>
......@@ -135,17 +135,16 @@
/>
<d2-dialog
title="阳光激励配置"
mode="mid"
v-if="signVisible"
:is-visible="signVisible"
@closeDialog="handleSignClose"
@confirmDialog="handleConfirmSign"
>
<glsx-combi-form
:isBlock="true"
class="edit-form-container"
ref="editFormRef"
label-width="220px"
default-width="400px"
:form-obj="integralForm"
:form-data="integralFormData"
>
......@@ -175,7 +174,8 @@ import {
getShopMerchantConfig,
switchPointSign,
getShopMerchantPointConfig,
getSunshineIncentivePoint
getSunshineIncentivePoint,
setShopMerchantPointConfig
} from "@/api/shopConfig.js"
import {
merchantOutputValueTargetExport,
......@@ -409,7 +409,9 @@ export default {
pointsWechatWithdrawal: "N",
pointsAudit: "N",
pointsMultiRole: "N",
pointsAllocate: 0
pointsAllocate: 0,
deliverySpecialistConfig: "",
salesConsultantConfig: ""
},
integralFormData: [
{
......@@ -481,19 +483,33 @@ export default {
label: "交付专员",
name: "deliverySpecialistConfig",
type: "select",
width: "300px",
optionList: [],
optionId: "confId",
optionLabel: "confName",
optionsName: "sunshineIncentList"
optionId: "expenseCategoryId",
optionLabel: "expenseCategoryName",
optionsName: "sunshineIncentList",
changeAttr: (val) => {
this.integralForm.salesConsultantConfig = this.filterData(
val,
this.baseData.sunshineIncentList
)[0].expenseCategoryId
}
},
{
label: "销售顾问/录单员",
name: "salesConsultantConfig",
type: "select",
width: "300px",
optionList: [],
optionId: "confId",
optionLabel: "confName",
optionsName: "sunshineIncentList"
optionId: "expenseCategoryId",
optionLabel: "expenseCategoryName",
optionsName: "sunshineIncentList",
changeAttr: (val) => {
this.integralForm.deliverySpecialistConfig = this.filterData(
val,
this.baseData.sunshineIncentList
)[0].expenseCategoryId
}
}
]
}
......@@ -539,12 +555,15 @@ export default {
try {
getShopMerchantPointConfig({ merchantId: data.merchantId }).then(
(res) => {
if (res) {
console.log(res)
this.integralForm.pointsMultiRole = res.pointsMultiRole
} else {
this.integralForm.pointsMultiRole = "N"
}
console.log(res)
this.integralForm.pointsMultiRole = res.pointsMultiRole
? res.pointsMultiRole
: "N"
this.integralForm.deliverySpecialistConfig =
res.deliverySpecialistConfig ? res.deliverySpecialistConfig : 1100
this.integralForm.salesConsultantConfig = res.salesConsultantConfig
? res.salesConsultantConfig
: 902
}
)
} catch (err) {}
......@@ -553,19 +572,19 @@ export default {
try {
getShopMerchantConfig({ merchantId: data.merchantId }).then((res) => {
if (res) {
this.integralForm = {
Object.assign(this.integralForm, {
pointsRefundAvailable: res.pointsRefundAvailable,
pointsAllocate: res.pointsAllocate,
pointsAudit: res.pointsAudit,
pointsWechatWithdrawal: res.pointsWechatWithdrawal
}
})
} else {
this.integralForm = {
Object.assign(this.integralForm, {
pointsWechatWithdrawal: "N",
pointsAudit: "N",
pointsRefundAvailable: "N",
pointsAllocate: 0
}
})
}
this.integralForm.merchantId = data.merchantId
})
......@@ -573,6 +592,11 @@ export default {
return new Error(err)
}
},
filterData(id, data) {
return data.length > 0
? data.filter((item) => item.expenseCategoryId !== id)
: ""
},
getSunshineIncentivePointData() {
try {
getSunshineIncentivePoint({}).then((res) => {
......@@ -586,6 +610,7 @@ export default {
this.baseData[item.optionsName]
)
}
//deliverySpecialistConfig 交付专员 salesConsultantConfig销售
})
}
})
......@@ -870,10 +895,42 @@ export default {
handleSignClose() {
this.signVisible = false
},
handleConfirmSign() {
switchPointSign({
...this.integralForm
saveShopMerchantPointConfig() {
return new Promise((resolve, reject) => {
let params = {
merchantId: this.integralForm.merchantId,
pointsMultiRole: this.integralForm.pointsMultiRole,
deliverySpecialistConfig: this.integralForm.deliverySpecialistConfig,
salesConsultantConfig: this.integralForm.salesConsultantConfig
}
setShopMerchantPointConfig(params).then((res) => {
if (res) {
resolve(true)
} else {
reject()
}
})
}).catch((err) => {
reject()
})
},
savePointSign() {
return new Promise((resolve, reject) => {
switchPointSign({
...this.integralForm
}).then((result) => {
if (result) {
resolve(true)
} else {
reject()
}
})
}).catch((err) => {
reject()
})
},
handleConfirmSign() {
Promise.all([this.saveShopMerchantPointConfig(), this.savePointSign()])
.then((result) => {
if (result) {
this.signVisible = false
......@@ -881,6 +938,7 @@ export default {
}
})
.catch((err) => {
this.$message.error("阳光激励配置配置失败")
new Error(err)
})
},
......@@ -975,6 +1033,9 @@ export default {
<style lang="scss" scoped>
::v-deep.edit-form-container {
.el-form-item {
display: flex;
}
.tips-icon {
border: none;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!