Commit a8908da6 by wangzhihui

话术违规与店面配置

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