@@ -1026,6 +1026,16 @@ export function waitingForOperation(data) { | |||||
data | data | ||||
}) | }) | ||||
} | } | ||||
// 首页公司数据 接待趋势 销讲趋势 | |||||
export function companyBackendData(data) { | |||||
return request({ | |||||
url: 'autoSR/cusStageStatistics/companyBackendData', | |||||
method: 'post', | |||||
data | |||||
}) | |||||
} | |||||
// 设备绑定 | // 设备绑定 | ||||
export function scheduling(query) { | export function scheduling(query) { | ||||
return request({ | return request({ | ||||
@@ -1303,3 +1303,33 @@ export function allHousePage(params) { | |||||
params | params | ||||
}) | }) | ||||
} | } | ||||
// 客户意向等级列表 | |||||
export function customerLevelList(params) { | |||||
return request({ | |||||
url: 'autoSR/zk/keywords/customerLevelList', | |||||
method: 'get', | |||||
params | |||||
}) | |||||
} | |||||
// 保存客户意向等级列表 | |||||
export function customerLevelUpdate(data) { | |||||
return request({ | |||||
url: 'autoSR/zk/keywords/customerLevelUpdate', | |||||
method: 'post', | |||||
data | |||||
}) | |||||
} | |||||
// 公司后台用户洞察 | |||||
export function findmatchdataByOrgCode(data) { | |||||
return request({ | |||||
url: 'autoSR/cusStageStatistics/findmatchdataByOrgCode', | |||||
method: 'post', | |||||
data | |||||
}) | |||||
} |
@@ -56,10 +56,12 @@ export default [{ | |||||
}, | }, | ||||
{ | { | ||||
path: '/Statistics/createReport', | path: '/Statistics/createReport', | ||||
name: '创建报告', | |||||
component: () => import(/* webpackChunkName: "views" */"@/views/Statistics/createReport") | component: () => import(/* webpackChunkName: "views" */"@/views/Statistics/createReport") | ||||
}, | }, | ||||
{ | { | ||||
path: '/Statistics/reportDetail', | path: '/Statistics/reportDetail', | ||||
name: '报告详情', | |||||
component: () => import(/* webpackChunkName: "views" */"@/views/Statistics/reportDetail") | component: () => import(/* webpackChunkName: "views" */"@/views/Statistics/reportDetail") | ||||
} | } | ||||
@@ -411,3 +411,46 @@ export function exportMethodPost(url, name, data = {}) { | |||||
console.log(error); | console.log(error); | ||||
}); | }); | ||||
} | } | ||||
// 导出.Excel公用方法 | |||||
export function exportMethodPostTxt(url, name, data = {}) { | |||||
axios({ | |||||
method: "get", | |||||
url: url, | |||||
params:data, | |||||
responseType: "blob", | |||||
}) | |||||
.then((res) => { | |||||
console.log(res,'数据'); | |||||
if(res.size==0){ | |||||
this.$message.warning('当前报表没数据') | |||||
console.log('没数据'); | |||||
return | |||||
} | |||||
let blob = new Blob([res], { type: "application/vnd.ms-excel" }); | |||||
let date = new Date(); | |||||
let time = date.toLocaleDateString(); | |||||
// console.log(time, "时间"); | |||||
if ("download" in document.createElement("a")) { | |||||
const link = document.createElement("a"); | |||||
link.style.display = "none"; | |||||
link.href = URL.createObjectURL(blob); | |||||
// link.download = res.headers['content-disposition'] //下载后文件名 | |||||
link.download = (name || "导出文件") + time + ".txt"; //下载的文件名 | |||||
document.body.appendChild(link); | |||||
link.click(); | |||||
document.body.removeChild(link); | |||||
} else { | |||||
// console.log("--------------------jingla") | |||||
let fileName = (name || "导出文件") + time + ".txt"; //下载的文件名 | |||||
navigator.msSaveBlob(blob, fileName); | |||||
} | |||||
}) | |||||
.catch((error) => { | |||||
// Message.error({ | |||||
// message: '网络连接错误' | |||||
// }) | |||||
console.log(error); | |||||
}); | |||||
} |
@@ -142,6 +142,10 @@ | |||||
> | > | ||||
<el-input v-model="addForm.name" placeholder="二级名称" maxlength="8" autocomplete="off"></el-input> | <el-input v-model="addForm.name" placeholder="二级名称" maxlength="8" autocomplete="off"></el-input> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="权重:" v-if="level==2" :label-width="formLabelWidth"> | |||||
<el-input v-model="addForm.weight" type="number" maxlength="8" autocomplete="off"></el-input> | |||||
</el-form-item> | |||||
<el-form-item | <el-form-item | ||||
label="三级名称:" | label="三级名称:" | ||||
v-if="level == 3" | v-if="level == 3" | ||||
@@ -246,6 +250,12 @@ | |||||
</el-radio-group> | </el-radio-group> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div v-if="frosasd.level == 2" style="display: flex;align-items: center;height: 40px;"> | |||||
<div style="width: 90px;height: 30px;line-height: 30px;">权重:</div> | |||||
<el-input v-model="frosasd.weight" maxlength="3" type="number"/> | |||||
</div> | |||||
<div style="display: flex; justify-content: center; margin-top: 40px"> | <div style="display: flex; justify-content: center; margin-top: 40px"> | ||||
<button | <button | ||||
style=" | style=" | ||||
@@ -304,6 +314,7 @@ | |||||
<el-button type="primary" @click="addclick()">确 定</el-button> | <el-button type="primary" @click="addclick()">确 定</el-button> | ||||
</span> | </span> | ||||
</el-dialog> | </el-dialog> | ||||
<!-- 匹配模型 --> | <!-- 匹配模型 --> | ||||
<el-dialog | <el-dialog | ||||
title="编辑模型" | title="编辑模型" | ||||
@@ -442,6 +453,8 @@ export default { | |||||
name: "", | name: "", | ||||
endName: "", | endName: "", | ||||
sceneDesc: "", | sceneDesc: "", | ||||
weight: 0, | |||||
}, | }, | ||||
addForm2: { | addForm2: { | ||||
name: "", | name: "", | ||||
@@ -461,6 +474,8 @@ export default { | |||||
level: "", | level: "", | ||||
desc: "", | desc: "", | ||||
mustSelected: 1, // 是否必选 | mustSelected: 1, // 是否必选 | ||||
weight: 0, | |||||
}, | }, | ||||
amountintervalname: "", | amountintervalname: "", | ||||
isInterval: "", | isInterval: "", | ||||
@@ -863,6 +878,8 @@ export default { | |||||
isInterval: this.isInterval, | isInterval: this.isInterval, | ||||
houseId: this.houseId, | houseId: this.houseId, | ||||
desc: this.addForm.sceneDesc, | desc: this.addForm.sceneDesc, | ||||
weight: Number(this.addForm.weight), | |||||
}, | }, | ||||
}).then((res) => { | }).then((res) => { | ||||
if (res.code == 0) { | if (res.code == 0) { | ||||
@@ -965,6 +982,8 @@ export default { | |||||
level: "", | level: "", | ||||
desc: "", | desc: "", | ||||
mustSelected: 1, | mustSelected: 1, | ||||
weight: 0, | |||||
}; | }; | ||||
if (data.isInterval == 0) { | if (data.isInterval == 0) { | ||||
this.frosasd.isInterval = 0; | this.frosasd.isInterval = 0; | ||||
@@ -980,7 +999,7 @@ export default { | |||||
this.frosasd.isInterval = 1; | this.frosasd.isInterval = 1; | ||||
} | } | ||||
if (data.level == 1) { | if (data.level == 1) { | ||||
this.frosasd.mustSelected = data.mustSelected; | |||||
this.frosasd.mustSelected = data.mustSelected; | |||||
} | } | ||||
this.frosasd.id = data.id; | this.frosasd.id = data.id; | ||||
this.frosasd.name = data.name; | this.frosasd.name = data.name; | ||||
@@ -989,6 +1008,8 @@ export default { | |||||
this.frosasd.sort = data.sort; | this.frosasd.sort = data.sort; | ||||
this.frosasd.level = data.level; | this.frosasd.level = data.level; | ||||
this.frosasd.desc = data.desc; | this.frosasd.desc = data.desc; | ||||
this.frosasd.weight = Number(data.weight) || 0; | |||||
this.isshowage = true; | this.isshowage = true; | ||||
}, | }, | ||||
//取消编辑 | //取消编辑 | ||||
@@ -1032,6 +1053,7 @@ export default { | |||||
}, | }, | ||||
infosubmiadd() { | infosubmiadd() { | ||||
var that = this; | var that = this; | ||||
this.frosasd.weight = Number(this.frosasd.weight) | |||||
axios({ | axios({ | ||||
url: `/autoSR/zk/keywords/update`, | url: `/autoSR/zk/keywords/update`, | ||||
method: "post", | method: "post", | ||||
@@ -1227,4 +1249,10 @@ export default { | |||||
max-height: 100px; | max-height: 100px; | ||||
margin: 0 10px; | margin: 0 10px; | ||||
} | } | ||||
/deep/input::-webkit-outer-spin-button, | |||||
/deep/input::-webkit-inner-spin-button { | |||||
-webkit-appearance: none !important; | |||||
margin: 0; | |||||
} | |||||
</style> | </style> |
@@ -259,6 +259,17 @@ export default { | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
{ | |||||
label: "客户意向度", | |||||
prop: "levelFraction", | |||||
width: "150px", | |||||
formatter: (data) => { | |||||
return `${data.levelFraction || 0}%` | |||||
} | |||||
}, | |||||
{ | { | ||||
label: "客户阶段", | label: "客户阶段", | ||||
prop: "clientStageName", | prop: "clientStageName", | ||||
@@ -632,7 +632,7 @@ | |||||
<el-button type="text">生成中</el-button> | <el-button type="text">生成中</el-button> | ||||
</template> | </template> | ||||
<template v-else> | <template v-else> | ||||
<el-button @click="exportMethodPost(row)" type="text" | |||||
<el-button @click="downLoadDebug(row)" type="text" | |||||
>下载</el-button | >下载</el-button | ||||
> | > | ||||
</template> | </template> | ||||
@@ -666,7 +666,7 @@ | |||||
<script> | <script> | ||||
import { mapGetters } from "vuex"; | import { mapGetters } from "vuex"; | ||||
import { exportMethodPost } from "@/util/util"; | |||||
import { exportMethodPost, exportMethodPostTxt } from "@/util/util"; | |||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
@@ -967,6 +967,16 @@ export default { | |||||
this.setFiltterOption(); | this.setFiltterOption(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
// 导出.Excel公用方法 | |||||
downLoadDebug(row) { | |||||
exportMethodPostTxt('autoSR/zk/equipment/filedownload', 'debug日志', {fileUrl: row.fileUrl,fileName: row.fileName}) | |||||
// location.href = | |||||
// `${jypath}?fileUrl=` + | |||||
// row.fileUrl + | |||||
// "&fileName=" + | |||||
// row.fileName; | |||||
}, | |||||
deleteLogBug(data) { | deleteLogBug(data) { | ||||
console.log(data); | console.log(data); | ||||
this.$confirm( | this.$confirm( | ||||
@@ -6,6 +6,7 @@ | |||||
<el-select | <el-select | ||||
class="right-select" | class="right-select" | ||||
placeholder="请选择公司" | placeholder="请选择公司" | ||||
disabled | |||||
v-model="inParamsObj.orgCode" | v-model="inParamsObj.orgCode" | ||||
> | > | ||||
<el-option | <el-option | ||||
@@ -576,9 +577,9 @@ | |||||
</section> | </section> | ||||
<!-- <%-- 保存--%> --> | <!-- <%-- 保存--%> --> | ||||
<section class="sections" style="display: flex; justify-content: flex-end"> | |||||
<el-button type="primary" @click="creatMonthRule">保存</el-button> | |||||
</section> | |||||
<!-- <section class="sections"> --> | |||||
<el-button type="primary" style="position: sticky;bottom: 20px;margin: 0 auto;display: block;width: 150px;" @click="creatMonthRule">保存</el-button> | |||||
<!-- </section> --> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -981,7 +982,7 @@ export default { | |||||
type: 0, // 报告类型 0:公司,1:项目 | type: 0, // 报告类型 0:公司,1:项目 | ||||
rule: "", // 月报规则 | rule: "", // 月报规则 | ||||
name: "", // 报告名称 | name: "", // 报告名称 | ||||
orgCode: "", // orgCode 公司code(type为0传这个参数 ) | |||||
orgCode: localStorage.getItem('orgCode'), // orgCode 公司code(type为0传这个参数 ) | |||||
houseId: "", // houseId 项目id(type为1传这个参数 ) | houseId: "", // houseId 项目id(type为1传这个参数 ) | ||||
}, | }, | ||||
@@ -1302,6 +1303,10 @@ export default { | |||||
) { | ) { | ||||
this.inParamsObj.id = this.ruleId; | this.inParamsObj.id = this.ruleId; | ||||
} | } | ||||
if(!this.inParamsObj.name) { | |||||
this.$message.error('请填写模板名称') | |||||
return | |||||
} | |||||
this.addMonthlyRule(); | this.addMonthlyRule(); | ||||
}, | }, | ||||
@@ -1334,12 +1339,15 @@ export default { | |||||
margin: 0 auto; | margin: 0 auto; | ||||
width: 98%; | width: 98%; | ||||
height: 90%; | height: 90%; | ||||
overflow-y: auto; | |||||
padding: 15px; | padding: 15px; | ||||
background: #fff; | background: #fff; | ||||
border-radius: 16px; | border-radius: 16px; | ||||
} | } | ||||
.titles { | .titles { | ||||
position: sticky; | |||||
top: 0; | |||||
padding: 10px 20px; | padding: 10px 20px; | ||||
background: #fff; | background: #fff; | ||||
display: flex; | display: flex; | ||||
@@ -77,7 +77,6 @@ | |||||
<el-table | <el-table | ||||
:data="tableData" | :data="tableData" | ||||
stripe | stripe | ||||
:load="loading" | |||||
:header-cell-style="{ | :header-cell-style="{ | ||||
background: '#F7F8FA', | background: '#F7F8FA', | ||||
borderColor: '#E0E0E0', | borderColor: '#E0E0E0', | ||||
@@ -282,6 +281,7 @@ export default { | |||||
this.pageParams.pageSize = 10; | this.pageParams.pageSize = 10; | ||||
this.pageParams.statDateStart = ""; | this.pageParams.statDateStart = ""; | ||||
this.pageParams.statDateEnd = ""; | this.pageParams.statDateEnd = ""; | ||||
this.customtime = [] | |||||
}, | }, | ||||
//时间tab切换 | //时间tab切换 | ||||
tabtimetap() { | tabtimetap() { | ||||
@@ -449,4 +449,8 @@ export default { | |||||
-webkit-box-shadow: -1px 0 0 0 #2671e2; | -webkit-box-shadow: -1px 0 0 0 #2671e2; | ||||
box-shadow: -1px 0 0 0 #2671e2; | box-shadow: -1px 0 0 0 #2671e2; | ||||
} | } | ||||
/deep/ .el-range-separator { | |||||
width: 10%; | |||||
} | |||||
</style> | </style> |
@@ -350,7 +350,8 @@ export default { | |||||
total: 0, | total: 0, | ||||
pageNum: 1, //页码 | pageNum: 1, //页码 | ||||
pageSize: 10, //每页显示的记录数 | pageSize: 10, //每页显示的记录数 | ||||
houseId: localStorage.getItem("houseId"), // 当前登陆楼盘 | |||||
// houseId: localStorage.getItem("houseId"), // 当前登陆楼盘 | |||||
orgCode: localStorage.getItem("orgCode"), | |||||
}, | }, | ||||
projectList: [], // 项目列表 | projectList: [], // 项目列表 | ||||
@@ -687,6 +688,6 @@ export default { | |||||
} | } | ||||
.little { | .little { | ||||
width: 120px; | |||||
width: 270px; | |||||
} | } | ||||
</style> | </style> |
@@ -970,15 +970,13 @@ export default { | |||||
// 评分保存 新增模板 | // 评分保存 新增模板 | ||||
saveRate(params) { | saveRate(params) { | ||||
console.log('调用') | console.log('调用') | ||||
// if(!params.templateName) { | |||||
// this.$message({ | |||||
// message: "请填写模板名称", | |||||
// type: "error", | |||||
// }); | |||||
// return | |||||
// } | |||||
if(!params.templateName) { | |||||
this.$message({ | |||||
message: "请填写模板名称", | |||||
type: "error", | |||||
}); | |||||
return | |||||
} | |||||
if (this.Templateid != "") { | if (this.Templateid != "") { | ||||
params.tempId = this.Templateid; | params.tempId = this.Templateid; | ||||
} | } | ||||
@@ -0,0 +1,283 @@ | |||||
<template> | |||||
<div class="pages"> | |||||
<div class="head-line"> | |||||
<div class="title">客户等级</div> | |||||
<div class="title"> | |||||
<el-button type="primary" @click="showAdd">设置意向区间</el-button> | |||||
</div> | |||||
</div> | |||||
<div class="boy"> | |||||
<el-table :data="tableData" style="width: 100%; height: 100%"> | |||||
<el-table-column type="index" label="序号" width="90"> | |||||
</el-table-column> | |||||
<el-table-column prop="customerLevel" label="等级"> </el-table-column> | |||||
<el-table-column prop="name" label="画像意向区间"> | |||||
<template slot-scope="{ row }"> | |||||
{{ row.startFraction || 0 }} ~ {{ row.endFraction || 0 }} | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column | |||||
prop="customerCount" | |||||
style="color: #2671e2" | |||||
label="关联客户" | |||||
> | |||||
</el-table-column> | |||||
</el-table> | |||||
</div> | |||||
<el-dialog | |||||
title="设置" | |||||
:visible.sync="dialogFormVisible" | |||||
width="500px" | |||||
center | |||||
:close-on-click-modal="false" | |||||
> | |||||
<div class=""> | |||||
<el-table :data="addFormList" style="width: 100%"> | |||||
<el-table-column label="等级" prop="title"> </el-table-column> | |||||
<el-table-column label="最低意向" prop="startFraction"> | |||||
<template slot-scope="{ row }"> | |||||
<el-input | |||||
type="number" | |||||
:disabled="row.disabled" | |||||
v-model="row.startFraction" | |||||
placeholder="请输入最低意向" | |||||
clearable | |||||
></el-input> | |||||
</template> | |||||
</el-table-column> | |||||
<el-table-column label="最高意向" prop="endFraction"> | |||||
<template slot-scope="{ row }"> | |||||
<el-input | |||||
v-if="row.endFraction == 100" | |||||
disabled | |||||
type="number" | |||||
v-model="row.endFraction" | |||||
placeholder="请输入最高意向" | |||||
clearable | |||||
></el-input> | |||||
<el-input | |||||
v-else | |||||
type="text" | |||||
@change="endFractionChange(row)" | |||||
maxlength="2" | |||||
@keyup="value = value.replace(/[^\d]/g, '')" | |||||
@afterpaste="value = value.replace(/[^\d]/g, '')" | |||||
v-model="row.endFraction" | |||||
placeholder="请输入最高意向" | |||||
clearable | |||||
></el-input> | |||||
</template> | |||||
</el-table-column> | |||||
</el-table> | |||||
</div> | |||||
<div slot="footer" class="dialog-footer"> | |||||
<el-button @click="dialogFormVisible = false">取 消</el-button> | |||||
<el-button type="primary" @click="submit">确 定</el-button> | |||||
</div> | |||||
</el-dialog> | |||||
</div> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
data() { | |||||
return { | |||||
houseId: localStorage.getItem("houseId"), // 项目id | |||||
tableData: [], // 表格数据 | |||||
dialogFormVisible: false, // 客户需求等级 | |||||
addFormList: [ | |||||
{ | |||||
title: "A", // abcd四个等级 | |||||
customerLevel: 1, | |||||
customerLevelName: "A", | |||||
startFraction: "", | |||||
endFraction: 100, | |||||
disabled: true, // 是否禁用 | |||||
}, | |||||
{ | |||||
title: "B", // abcd四个等级 | |||||
customerLevel: 2, | |||||
customerLevelName: "B", | |||||
startFraction: "", | |||||
endFraction: "", | |||||
disabled: true, // 是否禁用 | |||||
}, | |||||
{ | |||||
title: "C", // abcd四个等级 | |||||
customerLevel: 3, | |||||
customerLevelName: "C", | |||||
startFraction: "", | |||||
endFraction: "", | |||||
disabled: true, // 是否禁用 | |||||
}, | |||||
{ | |||||
title: "D", // abcd四个等级 | |||||
customerLevel: 4, | |||||
customerLevelName: "D", | |||||
startFraction: 0, | |||||
endFraction: "", | |||||
disabled: true, // 是否禁用 | |||||
}, | |||||
], | |||||
}; | |||||
}, | |||||
computed: {}, | |||||
created() {}, | |||||
mounted() { | |||||
this.customerLevelList(); | |||||
}, | |||||
methods: { | |||||
// 修改值 | |||||
endFractionChange(data) { | |||||
console.log(data); | |||||
var index = this.addFormList.findIndex( | |||||
(item) => item.customerLevel == data.customerLevel | |||||
); | |||||
if (data.endFraction) { | |||||
this.addFormList[index - 1].startFraction = data.endFraction * 1 + 1; | |||||
} | |||||
}, | |||||
resetParams() { | |||||
this.addFormList = [ | |||||
{ | |||||
title: "A", // abcd四个等级 | |||||
customerLevel: 1, | |||||
customerLevelName: "A", | |||||
startFraction: "", | |||||
endFraction: 100, | |||||
disabled: true, // 是否禁用 | |||||
}, | |||||
{ | |||||
title: "B", // abcd四个等级 | |||||
customerLevel: 2, | |||||
customerLevelName: "B", | |||||
startFraction: "", | |||||
endFraction: "", | |||||
disabled: true, // 是否禁用 | |||||
}, | |||||
{ | |||||
title: "C", // abcd四个等级 | |||||
customerLevel: 3, | |||||
customerLevelName: "C", | |||||
startFraction: "", | |||||
endFraction: "", | |||||
disabled: true, // 是否禁用 | |||||
}, | |||||
{ | |||||
title: "D", // abcd四个等级 | |||||
customerLevel: 4, | |||||
customerLevelName: "D", | |||||
startFraction: 0, | |||||
endFraction: "", | |||||
disabled: true, // 是否禁用 | |||||
}, | |||||
]; | |||||
}, | |||||
submit() { | |||||
let arr = []; | |||||
try { | |||||
this.addFormList.forEach((item) => { | |||||
if (!item.startFraction && item.customerLevel != 4) { | |||||
throw new Error(item.title + "," + "startFraction"); | |||||
} else if (!item.endFraction) { | |||||
throw new Error(item.title + "," + "endFraction"); | |||||
} else { | |||||
arr.push({ | |||||
houseId: localStorage.getItem("houseId"), | |||||
startFraction: Number(item.startFraction), | |||||
endFraction: Number(item.endFraction), | |||||
customerLevel: item.customerLevel, | |||||
}); | |||||
} | |||||
}); | |||||
} catch (e) { | |||||
let title = e.message.split(",")[0]; | |||||
let value = | |||||
e.message.split(",")[1] == "startFraction" ? "最低意向" : "最高意向"; | |||||
this.$message.error("请填写等级" + title + "的" + value); | |||||
return; | |||||
} | |||||
this.$api.http | |||||
.customerLevelUpdate({ | |||||
zkCustomerIntentionList: arr, | |||||
}) | |||||
.then((res) => { | |||||
console.log(res, "sdkjal"); | |||||
if (res.code == 0) { | |||||
this.$message.success(res.msg); | |||||
this.customerLevelList(); | |||||
this.resetParams(); | |||||
this.dialogFormVisible = false; | |||||
} else { | |||||
this.$message.error(res.msg); | |||||
} | |||||
}); | |||||
}, | |||||
// 修改意向等级 | |||||
showAdd() { | |||||
this.dialogFormVisible = true; | |||||
}, | |||||
// 客户意向等级列表 | |||||
customerLevelList() { | |||||
this.$api.http | |||||
.customerLevelList({ | |||||
houseId: this.houseId, | |||||
}) | |||||
.then((res) => { | |||||
console.log(res, "asdkal;sdl;asklksl;kl;askl;asalk;s"); | |||||
if (res.code == 0) { | |||||
this.tableData = res.data; | |||||
this.addFormList.forEach((objs) => { | |||||
let add = res.data.find( | |||||
(item) => objs.customerLevelName == item.customerLevel | |||||
); | |||||
if (add) { | |||||
objs.startFraction = add.startFraction; | |||||
objs.endFraction = add.endFraction; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
}, | |||||
}; | |||||
</script> | |||||
<style lang="scss" scoped> | |||||
.pages { | |||||
margin: 0 auto; | |||||
padding: 0; | |||||
width: 98%; | |||||
input::-webkit-outer-spin-button, | |||||
input::-webkit-inner-spin-button { | |||||
-webkit-appearance: none !important; | |||||
margin: 0; | |||||
} | |||||
.head-line { | |||||
margin: 20px auto 20px; | |||||
padding: 0 20px; | |||||
width: 100%; | |||||
height: 80px; | |||||
background: #ffffff; | |||||
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04); | |||||
border-radius: 8px; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-between; | |||||
} | |||||
.boy { | |||||
padding: 20px; | |||||
flex-grow: 1; | |||||
background: #fff; | |||||
display: flex; | |||||
} | |||||
} | |||||
</style> |
@@ -309,7 +309,7 @@ | |||||
</el-radio-group> | </el-radio-group> | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item label="付费方式" prop="wayOfPaying"> | <el-form-item label="付费方式" prop="wayOfPaying"> | ||||
<el-radio-group class="houseType" v-model="ruleForm.wayOfPaying"> | |||||
<el-radio-group v-model="ruleForm.wayOfPaying"> | |||||
<el-radio :label="0">包段付费</el-radio> | <el-radio :label="0">包段付费</el-radio> | ||||
<el-radio :label="1">转写付费</el-radio> | <el-radio :label="1">转写付费</el-radio> | ||||
</el-radio-group> | </el-radio-group> | ||||
@@ -675,7 +675,7 @@ | |||||
<el-radio-group v-model="rewriteRecharge.operateType"> | <el-radio-group v-model="rewriteRecharge.operateType"> | ||||
<el-radio :label="0">购买</el-radio> | <el-radio :label="0">购买</el-radio> | ||||
<el-radio :label="1">赠送</el-radio> | <el-radio :label="1">赠送</el-radio> | ||||
<el-radio :label="2">赠送</el-radio> | |||||
<el-radio :label="2">扣购买</el-radio> | |||||
<el-radio :label="3">扣赠送</el-radio> | <el-radio :label="3">扣赠送</el-radio> | ||||
</el-radio-group> | </el-radio-group> | ||||
</el-form-item> | </el-form-item> | ||||
@@ -687,6 +687,10 @@ | |||||
> | > | ||||
</el-input>小时 | </el-input>小时 | ||||
</el-form-item> | </el-form-item> | ||||
<el-form-item v-if="rewriteRecharge.operateType == 2 || rewriteRecharge.operateType == 3" label="" prop="rechargeCount"> | |||||
最大可输入{{ rewriteRecharge.surplusSum || 0}}小时 | |||||
</el-form-item> | |||||
</el-form> | </el-form> | ||||
<div | <div | ||||
style=" | style=" | ||||
@@ -1140,11 +1144,21 @@ export default { | |||||
this.rewriteRecharge.houseId = data.id | this.rewriteRecharge.houseId = data.id | ||||
this.rewriteRecharge.houseName = res.data.houseName // 项目名称 | this.rewriteRecharge.houseName = res.data.houseName // 项目名称 | ||||
this.rewriteRecharge.surplusSum = res.data.surplusSum // 项目剩余时长 | this.rewriteRecharge.surplusSum = res.data.surplusSum // 项目剩余时长 | ||||
this.rewriteRecharge.rechargeSurplus = res.data.rechargeSurplus | |||||
this.rewriteRecharge.presenterSurplus = res.data.presenterSurplus | |||||
this.rewriteRechargeShowTips = true | this.rewriteRechargeShowTips = true | ||||
}); | }); | ||||
console.log(data); | console.log(data); | ||||
}, | }, | ||||
addRechargeHouse() { | addRechargeHouse() { | ||||
if (this.rewriteRecharge.operateType == 2 && this.rewriteRecharge.rechargeCount > this.rewriteRecharge.rechargeSurplus) { | |||||
this.$message.error(`扣购买的数量不能大于${this.rewriteRecharge.rechargeSurplus}`) | |||||
return | |||||
} | |||||
if (this.rewriteRecharge.operateType == 3 && this.rewriteRecharge.rechargeCount > this.rewriteRecharge.surplusSum) { | |||||
this.$message.error(`扣赠送的数量不能大于${this.rewriteRecharge.surplusSum}`) | |||||
return | |||||
} | |||||
this.$api.http.addRechargeHouse(this.rewriteRecharge).then(res => { | this.$api.http.addRechargeHouse(this.rewriteRecharge).then(res => { | ||||
this.zkhousePage(); | this.zkhousePage(); | ||||
this.rewriteRechargeShowTips = false | this.rewriteRechargeShowTips = false | ||||
@@ -193,24 +193,23 @@ | |||||
</div> | </div> | ||||
</section> | </section> | ||||
<el-dialog | <el-dialog | ||||
title="项目转写时长" | title="项目转写时长" | ||||
:visible.sync="housePageShow" | :visible.sync="housePageShow" | ||||
:close-on-click-modal="false" | :close-on-click-modal="false" | ||||
> | > | ||||
<div class="z-title"> | <div class="z-title"> | ||||
<p> | |||||
统计时间:{{ housePageParams.date }} | |||||
</p> | |||||
<p>统计时间:{{ housePageParams.date }}</p> | |||||
<el-button @click="downloadExcel" type="primary">导出</el-button> | <el-button @click="downloadExcel" type="primary">导出</el-button> | ||||
</div> | </div> | ||||
<el-table :data="housePage" height="400px"> | <el-table :data="housePage" height="400px"> | ||||
<el-table-column prop="houseName" label="项目名称"></el-table-column> | <el-table-column prop="houseName" label="项目名称"></el-table-column> | ||||
<el-table-column prop="rechargeCount" label="消费时长"></el-table-column> | |||||
<el-table-column prop="data" label="平均接待转写时长"> </el-table-column> | |||||
<el-table-column | |||||
prop="rechargeCount" | |||||
label="消费时长" | |||||
></el-table-column> | |||||
<el-table-column prop="data" label="平均接待转写时长"> | |||||
</el-table-column> | |||||
</el-table> | </el-table> | ||||
<div | <div | ||||
style=" | style=" | ||||
@@ -232,7 +231,6 @@ | |||||
</el-pagination> | </el-pagination> | ||||
</div> | </div> | ||||
</el-dialog> | </el-dialog> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -313,7 +311,7 @@ export default { | |||||
data1: [], //时段b | data1: [], //时段b | ||||
}, | }, | ||||
{ | { | ||||
title: "平均接待转写时长(分)", | |||||
title: "平均接待转写时长(小时)", | |||||
paramsName: "avgCostTransferTime", // 折线统计图&表格数据 | paramsName: "avgCostTransferTime", // 折线统计图&表格数据 | ||||
value: "", // 第一时段平均接待转写时长 | value: "", // 第一时段平均接待转写时长 | ||||
@@ -329,18 +327,21 @@ export default { | |||||
selectShowIndex: 0, // 选中下标 | selectShowIndex: 0, // 选中下标 | ||||
tableData: [], // 表格数据 | tableData: [], // 表格数据 | ||||
housePageShow: false,// 展示消费统计时长弹窗 | |||||
housePageShow: false, // 展示消费统计时长弹窗 | |||||
housePage: [], // 项目转写、消费统计时长 | housePage: [], // 项目转写、消费统计时长 | ||||
housePageParams: { | housePageParams: { | ||||
current: 1, // | current: 1, // | ||||
size: 10, // 分页 | size: 10, // 分页 | ||||
total: 0, // 总条数 | total: 0, // 总条数 | ||||
date: '', // | |||||
date: "", // | |||||
}, // 全部撰写消费 | }, // 全部撰写消费 | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
if(this.params.orgType == 3) { | |||||
this.params.houseId = localStorage.getItem('houseId') | |||||
} | |||||
this.getHouseList(); | this.getHouseList(); | ||||
this.consumptionTrend(); | this.consumptionTrend(); | ||||
}, | }, | ||||
@@ -378,7 +379,7 @@ export default { | |||||
let nameTime2 = `${array.data1[0].date}-${ | let nameTime2 = `${array.data1[0].date}-${ | ||||
array.data1[array.data1.length - 1].date | array.data1[array.data1.length - 1].date | ||||
}`; | }`; | ||||
this.housePageParams.date = nameTime1 | |||||
this.housePageParams.date = nameTime1; | |||||
let arr = [ | let arr = [ | ||||
{ | { | ||||
name: nameTime1, | name: nameTime1, | ||||
@@ -402,7 +403,10 @@ export default { | |||||
}); | }); | ||||
} | } | ||||
}, | }, | ||||
// 切换筛选日期类型 | |||||
tabtimetap(index) { | tabtimetap(index) { | ||||
this.emptyTimePickerChoose() | |||||
this.params.dateType = index; | this.params.dateType = index; | ||||
this.consumptionTrend(); | this.consumptionTrend(); | ||||
}, | }, | ||||
@@ -421,7 +425,9 @@ export default { | |||||
empty() { | empty() { | ||||
this.params.dateType = 3; // 1近七天 2 近十五天 3近三十天 | this.params.dateType = 3; // 1近七天 2 近十五天 3近三十天 | ||||
this.params.operateType = ""; // 0:购买,1: 赠送,2:扣除购买,3:扣除赠送,4:长录音转写扣除,5:短录音转写扣除 | this.params.operateType = ""; // 0:购买,1: 赠送,2:扣除购买,3:扣除赠送,4:长录音转写扣除,5:短录音转写扣除 | ||||
this.params.houseId = ""; // 项目id | |||||
if (this.params.orgType != 3) { | |||||
this.params.houseId = ""; // 项目id | |||||
} | |||||
this.emptyTimePickerChoose(); | this.emptyTimePickerChoose(); | ||||
}, | }, | ||||
@@ -523,7 +529,7 @@ export default { | |||||
this.housePage = res.data.records; | this.housePage = res.data.records; | ||||
this.housePageParams.total = res.data.total; | this.housePageParams.total = res.data.total; | ||||
console.log(res.data.records, "housePage"); | console.log(res.data.records, "housePage"); | ||||
this.housePageShow = true | |||||
this.housePageShow = true; | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
@@ -589,11 +595,13 @@ export default { | |||||
}, | }, | ||||
//获取项目数据 | //获取项目数据 | ||||
getHouseList() { | getHouseList() { | ||||
this.$api.api.findHouseByUser({ | |||||
this.$api.api | |||||
.findHouseByUser({ | |||||
orgType: localStorage.getItem("orgType"), | orgType: localStorage.getItem("orgType"), | ||||
}).then((res) => { | |||||
this.houseList = res.data; | |||||
}); | |||||
}) | |||||
.then((res) => { | |||||
this.houseList = res.data; | |||||
}); | |||||
}, | }, | ||||
//卡片下折线图 | //卡片下折线图 | ||||
@@ -965,10 +973,9 @@ export default { | |||||
} | } | ||||
.z-title { | .z-title { | ||||
width: 100%; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
} | |||||
width: 100%; | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
} | |||||
</style> | </style> |
@@ -78,7 +78,10 @@ | |||||
</el-select> | </el-select> | ||||
</div> | </div> | ||||
<div class="div-lab" style="padding: 0 20px 0 0;flex-grow: 1;justify-content: flex-end;"> | |||||
<div | |||||
class="div-lab" | |||||
style="padding: 0 20px 0 0; flex-grow: 1; justify-content: flex-end" | |||||
> | |||||
<div style="margin-left: 5px"> | <div style="margin-left: 5px"> | ||||
<el-button @click="screen" type="primary">搜索</el-button> | <el-button @click="screen" type="primary">搜索</el-button> | ||||
</div> | </div> | ||||
@@ -225,10 +228,10 @@ export default { | |||||
houseList: [], // 项目列表 | houseList: [], // 项目列表 | ||||
table: [], // 页面转写消费数据 | table: [], // 页面转写消费数据 | ||||
paraphraseObj: { | paraphraseObj: { | ||||
rechargeSum: '', | |||||
presenterSum: '', | |||||
useSum: '', | |||||
surplusSum: '', | |||||
rechargeSum: "", | |||||
presenterSum: "", | |||||
useSum: "", | |||||
surplusSum: "", | |||||
}, // 转写消费 | }, // 转写消费 | ||||
}; | }; | ||||
}, | }, | ||||
@@ -240,12 +243,20 @@ export default { | |||||
methods: { | methods: { | ||||
// 导出 | // 导出 | ||||
downloadExcel() { | downloadExcel() { | ||||
exportMethodPost("/autoSR/zk/recharge/detailsExport", "项目转写消费时长", this.params); | |||||
exportMethodPost( | |||||
"/autoSR/zk/recharge/detailsExport", | |||||
"项目转写消费时长", | |||||
this.params | |||||
); | |||||
}, | }, | ||||
// 转写充值剩余 | // 转写充值剩余 | ||||
findByHouseIdForRecharge() { | findByHouseIdForRecharge() { | ||||
this.$api.http.homeFindByHouseIdForRecharge(this.params).then((res) => { | |||||
console.log(res) | |||||
let obj = { | |||||
...this.params, | |||||
}; | |||||
obj.dateType = null; | |||||
this.$api.http.homeFindByHouseIdForRecharge(obj).then((res) => { | |||||
console.log(res); | |||||
this.paraphraseObj = res.data.list; | this.paraphraseObj = res.data.list; | ||||
}); | }); | ||||
}, | }, | ||||
@@ -316,6 +327,9 @@ export default { | |||||
method: "get", | method: "get", | ||||
params: { | params: { | ||||
orgType: localStorage.getItem("orgType"), | orgType: localStorage.getItem("orgType"), | ||||
// agentId: localStorage.getItem("agentId"), | |||||
// orgCode: localStorage.getItem("orgCode"), | |||||
}, | }, | ||||
}).then((res) => { | }).then((res) => { | ||||
console.log(res); | console.log(res); | ||||