Commit a90c779a by zhangxw

督导联调

1 parent a9fd1790
...@@ -691,7 +691,7 @@ export function getCommissionListApi(data = {}) { ...@@ -691,7 +691,7 @@ export function getCommissionListApi(data = {}) {
} }
// 获取督导管理列表数据 // 获取督导管理列表数据
export function getSupervisorListApi(data = {}) { export function getSupervisorListApi(data = {}) {
data.method = ""; data.method = "dj.api.supervisor.manage.page"
return request(data, "post"); return request(data, "post");
} }
// 获取督导管理汇总数据 // 获取督导管理汇总数据
...@@ -699,10 +699,15 @@ export function getSupervisorSummaryApi(data = {}) { ...@@ -699,10 +699,15 @@ export function getSupervisorSummaryApi(data = {}) {
data.method = "dj.api.supervisor.manage.summary"; data.method = "dj.api.supervisor.manage.summary";
return request(data, "post"); return request(data, "post");
} }
// 获取近三年的周数据
export function getWeeklyRangesApi(data = {}) {
data.method = "dj.api.supervisor.get.generateWeeklyRanges";
return request(data, "post");
}
// 获取督导详情数据 // 获取督导详情数据
export function getSupervisorDetailApi(data = {}) { export function getSupervisorDetailApi(data = {}) {
data.method = ""; data.method = "dj.api.supervisor.manage.detail.staff.page"
return request(data, "post"); return request(data, "post")
} }
// 获取督导任务列表数据 // 获取督导任务列表数据
export function getSupervisorTaskListApi(data = {}) { export function getSupervisorTaskListApi(data = {}) {
......
...@@ -934,11 +934,11 @@ export const downloadReportManage_reportType = [ ...@@ -934,11 +934,11 @@ export const downloadReportManage_reportType = [
confValue: "销售日报月汇总表", confValue: "销售日报月汇总表",
}, },
{ {
confId: "", confId: "BIAnalysisReport",
confValue: "BI数据分析表", confValue: "BI数据分析表",
}, },
{ {
confId: "", confId: "TechnicianReport",
confValue: "技师报表", confValue: "技师报表",
}, },
]; ];
......
...@@ -3,56 +3,63 @@ ...@@ -3,56 +3,63 @@
<div class="header"> <div class="header">
<div class="left"> <div class="left">
<span class="title">录音复盘</span> <span class="title">录音复盘</span>
<span>提交人:{{ pageQuery.updatedBy }}</span> <span>提交人:{{ detail.updatedBy }}</span>
</div> </div>
<div>提交时间:{{ pageQuery.createTime }}</div> <div>提交时间:{{ detail.updatedDate }}</div>
</div>
<div class="content">
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<template slot="tag" slot-scope="scope">
<el-tooltip class="item"
:content="scope.scope.reviewTarget"
placement="top">
<span>
{{
scope.scope.reviewTarget
? scope.scope.reviewTarget.length > 10
? `${scope.scope.reviewTarget.substring(0, 10)}...`
: scope.scope.reviewTarget
: "-"
}}
</span>
</el-tooltip>
</template>
<template slot="review" slot-scope="scope">
<el-tooltip class="item"
:content="scope.scope.reviewContent"
placement="top">
<span>
{{
scope.scope.reviewContent
? scope.scope.reviewContent.length > 10
? `${scope.scope.reviewContent.substring(0, 10)}...`
: scope.scope.reviewContent
: "-"
}}
</span>
</el-tooltip>
</template>
</d2-table>
</div> </div>
<d2-table
ref="recordTable"
:get-list-api="getListApi"
:search-form="searchFormSearch"
:table-params="tableParams"
:before-search-fn="beforeSearchFn"
>
<template slot="tag" slot-scope="scope">
<el-tooltip class="item"
:content="scope.scope.reviewTarget"
placement="top">
<span>
{{
scope.scope.reviewTarget
? scope.scope.reviewTarget.length > 10
? `${scope.scope.reviewTarget.substring(0, 10)}...`
: scope.scope.reviewTarget
: "-"
}}
</span>
</el-tooltip>
</template>
<template slot="review" slot-scope="scope">
<el-tooltip class="item"
:content="scope.scope.reviewContent"
placement="top">
<span>
{{
scope.scope.reviewContent
? scope.scope.reviewContent.length > 10
? `${scope.scope.reviewContent.substring(0, 10)}...`
: scope.scope.reviewContent
: "-"
}}
</span>
</el-tooltip>
</template>
</d2-table>
</div> </div>
</template> </template>
<script> <script>
import page from "@/store/modules/d2admin/modules/page";
import { getSupervisorRecordListApi } from "@api/resident" import { getSupervisorRecordListApi } from "@api/resident"
import { mount } from "sortablejs"; import { Util } from "@/common/util"
export default { export default {
name: "RecordingDetail", name: "RecordingDetail",
props: {
detail: {
type: Object,
default: () => {}
}
},
data() { data() {
return { return {
getListApi: getSupervisorRecordListApi, getListApi: getSupervisorRecordListApi,
...@@ -68,7 +75,10 @@ export default { ...@@ -68,7 +75,10 @@ export default {
}, },
{ {
label: "接待日期", label: "接待日期",
prop: "staticDate" prop: "staticDate",
formatter: (cellValue) => {
return cellValue.staticDate ? Util.dateFormate(cellValue.staticDate, 'YYYY-MM-DD') : '-'
}
}, },
{ {
label: "接待门店", label: "接待门店",
...@@ -104,13 +114,12 @@ export default { ...@@ -104,13 +114,12 @@ export default {
} }
} }
}, },
mounted() { mounted() {
this.pageQuery = this.$route.query
}, },
methods: { methods: {
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = { id: this.pageQuery.id } this.searchFormSearch = { id: this.detail.id }
resolve() resolve()
}) })
} }
...@@ -134,5 +143,9 @@ export default { ...@@ -134,5 +143,9 @@ export default {
margin-right: 10px; margin-right: 10px;
} }
} }
.content {
background: #FFFFFF;
padding: 12px 20px;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -59,10 +59,10 @@ ...@@ -59,10 +59,10 @@
</div> </div>
</div> </div>
</template> </template>
<template v-if="detailInfo.taskType == '3'"> <template v-if="detailInfo.taskType == '1'">
<div class="item"> <div class="item">
<div class="label">复盘人员:</div> <div class="label">复盘人员:</div>
<div class="value">{{ detailInfo.storeManagerName }}</div> <div class="value">{{ detailInfo.reviewStaffNames }}</div>
</div> </div>
<div class="item"> <div class="item">
<div class="label">复盘记录:</div> <div class="label">复盘记录:</div>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<template v-if="detailInfo.taskType == '2'"> <template v-if="detailInfo.taskType == '2'">
<div class="item"> <div class="item">
<div class="label">月度计划:</div> <div class="label">月度计划:</div>
<div class="value"></div> <div class="value">{{ detailInfo.taskContext }}</div>
</div> </div>
</template> </template>
<template v-if="detailInfo.taskType == '4'"> <template v-if="detailInfo.taskType == '4'">
...@@ -149,7 +149,8 @@ export default { ...@@ -149,7 +149,8 @@ export default {
getDetail(id) { getDetail(id) {
getSupervisorTaskDetailApi({ id }).then(res => { getSupervisorTaskDetailApi({ id }).then(res => {
res.createTime = res.createTime ? dayjs(res.createTime).format("YYYY-MM-DD HH:mm:ss") : "" res.createTime = res.createTime ? dayjs(res.createTime).format("YYYY-MM-DD HH:mm:ss") : ""
res.taskImageList = res.taskImageList?.map(val => {return val.imageUrl}) || [] res.taskImageList = res.taskImageList?.map(val => { return val.imageUrl }) || []
res.reviewStaffNames = res?.weekTaskStaffList?.map(i => i.staffName).join(",") || ""
this.detailInfo = res || {} this.detailInfo = res || {}
}) })
}, },
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
import recording from "./components/recording.vue" import recording from "./components/recording.vue"
import reviewDetail from "./components/reviewDetail.vue" import reviewDetail from "./components/reviewDetail.vue"
import { mapActions } from "vuex" import { mapActions } from "vuex"
import { Util } from "@/common/util";
export default { export default {
name: "MissionDetail", name: "MissionDetail",
components: { components: {
...@@ -30,8 +31,12 @@ export default { ...@@ -30,8 +31,12 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.$route.query.detail, 'detail') let detail = JSON.parse(this.$route.query.detail)
this.detail = JSON.parse(this.$route.query.detail) detail = {
...detail,
updatedDate: detail.updatedDate ? Util.dateFormate(detail.updatedDate, 'YYYY-MM-DD HH:mm:ss') : '-'
}
this.detail = detail
}, },
methods: { methods: {
...mapActions({ ...mapActions({
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
总人数 总人数
</div> </div>
<div class="value"> <div class="value">
<span class="orange">{{ staticsData.totalCount }}</span> <span class="orange">{{ staticsData.totalCount != null ? staticsData.totalCount : '-' }}</span>
</div> </div>
</div> </div>
<div class="view-item"> <div class="view-item">
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
提交任务人数 提交任务人数
</div> </div>
<div class="value"> <div class="value">
<span class="green">{{ staticsData.submittedCount }}</span> <span class="green">{{ staticsData.submittedCount != null ? staticsData.submittedCount : '-' }}</span>
</div> </div>
</div> </div>
<div class="view-item"> <div class="view-item">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
提交任务数 提交任务数
</div> </div>
<div class="value"> <div class="value">
<span class="red">{{ staticsData.submittedTaskCount }}</span> <span class="red">{{ staticsData.submittedTaskCount != null ? staticsData.submittedTaskCount : '-' }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -147,6 +147,9 @@ export default { ...@@ -147,6 +147,9 @@ export default {
{ {
label: "任务提交时间", label: "任务提交时间",
prop: "createTime", prop: "createTime",
formatter: (cellValue) => {
return cellValue.updatedDate ? Util.dateFormate(cellValue.updatedDate, 'YYYY-MM-DD HH:mm:ss') : '-'
}
}, },
{ {
label: "提交人", label: "提交人",
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<template> <template>
<d2-container> <d2-container>
<div class="detail-content"> <div class="detail-content">
<div class="user-info"><span class="name">{{ '凉凉' }}</span><span>15622545578</span></div> <div class="user-info"><span class="name">{{ detail.name }}</span><span>{{ detail.phone }}</span></div>
<div class="content-box"> <div class="content-box" v-if="Object.keys(detail).length">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane v-for="item in tabList" :key="item.id" :label="item.name" :name="item.id"> <el-tab-pane v-for="item in tabList" :key="item.id" :label="item.name" :name="item.id">
</el-tab-pane> </el-tab-pane>
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
团队人员 团队人员
</div> </div>
<div class="value"> <div class="value">
<span class="orange">{{ staticsData.totalCount }}</span> <span class="orange">{{ staticsData.teamStaffCount || '-' }}</span>
</div> </div>
</div> </div>
<div class="view-item"> <div class="view-item">
<div class="label">产值</div> <div class="label">产值</div>
<div class="value"> <div class="value">
<span class="green">{{ staticsData.finishCount }}</span>万元 <span class="green">¥{{ staticsData.outputValue || 0 }}</span>
</div> </div>
</div> </div>
<div class="view-item"> <div class="view-item">
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
转化率 转化率
</div> </div>
<div class="value"> <div class="value">
<span class="red">{{ staticsData.undoCount }}</span> <span class="red">{{ staticsData.conversionRate || 0 }}%</span>
</div> </div>
</div> </div>
<div class="view-item"> <div class="view-item">
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
客单价 客单价
</div> </div>
<div class="value"> <div class="value">
<span class="red">{{ staticsData.undoCount }}</span> <span class="red">¥{{ staticsData.avgOrderValue || 0 }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</d2-container> </d2-container>
</template> </template>
<script> <script>
import { conversationPointPage } from "@api/resident" import { getSupervisorDetailSummaryApi, getSupervisorDetailApi } from "@api/resident"
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import dateSelectPicker from "../components/dateSelectPicker.vue"; import dateSelectPicker from "../components/dateSelectPicker.vue";
export default { export default {
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
return { return {
tabList: [{ tabList: [{
name: '全场景', name: '全场景',
id: '' id: '0'
}, { }, {
name: '延保', name: '延保',
id: '1' id: '1'
...@@ -81,13 +81,10 @@ export default { ...@@ -81,13 +81,10 @@ export default {
name: '轻改', name: '轻改',
id: '3' id: '3'
}], }],
getListApi: conversationPointPage, getListApi: getSupervisorDetailApi,
activeName: '', activeName: '0',
detail: {}, detail: {},
searchForm: { searchForm: {},
scene: "",
date: ""
},
searchFormSearch: {}, searchFormSearch: {},
staticsData: {}, staticsData: {},
tableParams: { tableParams: {
...@@ -97,49 +94,82 @@ export default { ...@@ -97,49 +94,82 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "驻店销售", label: "驻店销售",
prop: "content", prop: "staffName",
}, },
{ {
label: "归属业务", label: "归属业务",
prop: "firstClassify" prop: "bizNames",
formatter: (cellValue) => {
let names = ['', '延保', '权益', '轻改']
if (!cellValue.bizNames) return '-'
let bizArray = cellValue.bizNames?.split(',')?.map(item => item.trim()).filter(item => item !== '')
let result = bizArray.map(index => names[parseInt(index)]).filter(name => name !== '').join(',')
return result
}
}, },
{ {
label: "产值", label: "产值",
prop: "firstWeight" prop: "outputValue",
formatter: (cellValue) => {
return cellValue.outputValue ? `¥${cellValue.outputValue}` : '-'
}
}, },
{ {
label: "转化率", label: "转化率",
prop: "secondClassify" prop: "conversionRate",
formatter: (cellValue) => {
return cellValue.conversionRate ? `${cellValue.conversionRate}%` : '-'
}
}, },
{ {
label: "客单价", label: "客单价",
prop: "secondWeight", prop: "avgOrderValue",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.updatedDate ? `¥${cellValue.updatedDate}` : '-' return cellValue.avgOrderValue ? `¥${cellValue.avgOrderValue}` : '-'
} }
} }
] ]
} }
} }
}, },
created() { mounted() {
this.detail = JSON.parse(this.$route.query.detail) this.detail = JSON.parse(this.$route.query.detail)
}, },
methods: { methods: {
getStaticsData() {
let params = this.getParams()
getSupervisorDetailSummaryApi(params).then(res => {
this.staticsData = res
})
},
getParams() {
return {
supervisorPhone: this.detail.phone,
bizType: this.activeName > 0 ? this.activeName : undefined,
...this.searchForm
}
},
beforeSearchFn() { beforeSearchFn() {
return new Promise((resolve) => { return new Promise((resolve) => {
this.searchFormSearch = deepClone(this.searchForm) this.searchFormSearch = {
supervisorPhone: this.detail.phone,
bizType: this.activeName > 0 ? this.activeName : undefined,
...deepClone(this.searchForm)
}
resolve() resolve()
}) })
}, },
handleClick(event) { handleClick(event) {
this.activeName = event.paneName this.activeName = event.paneName
this.searchForm.scene = event.paneName || '' this.searchForm.bizType = event.paneName || ''
}, },
onDateChange(e) { onDateChange(e) {
this.searchForm.startTime = e.startTime?.replace(/\//g, "-") + " 00:00:00" let dateTypes = ['day', 'week', 'month']
this.searchForm.endTime = e.endTime?.replace(/\//g, "-") + " 23:59:59" this.searchForm.dateType = dateTypes?.findIndex(i => i == e.type)
this.$refs.supervisionDetailTable.refreshTable() this.searchForm.startDate = e.startTime?.replace(/\//g, "-")
this.searchForm.endDate = e.endTime?.replace(/\//g, "-")
this.$refs.supervisionDetailTable?.refreshTable(true, true)
this.getStaticsData()
} }
} }
} }
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="view-item"> <div class="view-item">
<div class="label">本月总产值</div> <div class="label">本月总产值</div>
<div class="value"> <div class="value">
<span class="green">{{ staticsData.monthlyOutput }}</span>万元 <span class="green">¥{{ staticsData.monthlyOutput || 0 }}</span>万元
</div> </div>
</div> </div>
<div class="view-item"> <div class="view-item">
...@@ -67,14 +67,14 @@ ...@@ -67,14 +67,14 @@
<script> <script>
import { Util, deepClone } from "@/common/util" import { Util, deepClone } from "@/common/util"
import { conversationPointPage, getSupervisorSummaryApi } from "@api/resident" import { getSupervisorListApi, getSupervisorSummaryApi } from "@api/resident"
import { mapActions } from "vuex" import { mapActions } from "vuex"
export default { export default {
name: "InspectionPoint", name: "InspectionPoint",
data() { data() {
return { return {
searchForm: { searchForm: {
supervisionName: "", name: "",
phone: "" phone: ""
}, },
searchFormSearch: {}, searchFormSearch: {},
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
showFormData: [ showFormData: [
{ {
label: "督导姓名", label: "督导姓名",
name: "supervisionName", name: "name",
type: "input", type: "input",
isClear: true isClear: true
}, },
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
addHtml: "phone" addHtml: "phone"
} }
], ],
getListApi: conversationPointPage, getListApi: getSupervisorListApi,
tableParams: { tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000), btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list", listName: "list",
...@@ -100,29 +100,29 @@ export default { ...@@ -100,29 +100,29 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: "督导姓名", label: "督导姓名",
prop: "content", prop: "name",
}, },
{ {
label: "手机号", label: "手机号",
prop: "firstClassify" prop: "phone"
}, },
{ {
label: "入职日期", label: "入职日期",
prop: "firstWeight" prop: "entryDate"
}, },
{ {
label: "团队人员", label: "团队人员",
prop: "secondClassify" prop: "teamStaffCount"
}, },
{ {
label: "管理门店", label: "管理门店",
prop: "secondWeight" prop: "managedStoreCount"
}, },
{ {
label: "产值", label: "产值",
prop: "updatedDate", prop: "outputValue",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.updatedDate ? `¥${cellValue.updatedDate}` : '-' return (cellValue.outputValue ?? '') === '' ? '-' : `¥${cellValue.outputValue}`
} }
} }
] ]
...@@ -164,7 +164,7 @@ export default { ...@@ -164,7 +164,7 @@ export default {
}, },
handleReset() { handleReset() {
this.searchForm = { this.searchForm = {
supervisionName: "", name: "",
phone: "" phone: ""
} }
this.$refs.supervisionTable.refreshTable(true, true) this.$refs.supervisionTable.refreshTable(true, true)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!