Commit a90c779a by zhangxw

督导联调

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