Commit b1883ddc by Jaxon

feat(督导统计): 业务开发

1 parent 300c2046
...@@ -3,8 +3,7 @@ export const supervisorSchemaList = [ ...@@ -3,8 +3,7 @@ export const supervisorSchemaList = [
{ {
name: "displayTotalOutput", name: "displayTotalOutput",
label: "总产值(万)", label: "总产值(万)",
colStyle: "flex: 1 0 calc((100% - 16px) / 3);margin-bottom:4px;margin-top:8px", colStyle: "flex: 1 0 calc((100% - 16px) / 3);margin-bottom:4px;margin-top:8px;border-top-left-radius: 8px",
}, },
{ {
name: "displayDeliveryCount", name: "displayDeliveryCount",
...@@ -14,7 +13,7 @@ export const supervisorSchemaList = [ ...@@ -14,7 +13,7 @@ export const supervisorSchemaList = [
{ {
name: "displayPreSalesTouchCount", name: "displayPreSalesTouchCount",
label: "触客数", label: "触客数",
colStyle: "flex: 1 0 calc((100%) / 3);margin-right:0;margin-bottom:4px;margin-top:8px", colStyle: "flex: 1 0 calc((100%) / 3);margin-right:0;margin-bottom:4px;margin-top:8px;border-top-right-radius: 8px;",
}, },
{ {
...@@ -73,7 +72,7 @@ export const supervisorCommonSchemaList = [ ...@@ -73,7 +72,7 @@ export const supervisorCommonSchemaList = [
{ {
name: "displayTotalOutput", name: "displayTotalOutput",
label: "总产值(万)", label: "总产值(万)",
colStyle: "flex: 1 0 calc((100% - 16px) / 3);margin-bottom:4px;margin-top:8px", colStyle: "flex: 1 0 calc((100% - 16px) / 3);margin-bottom:4px;margin-top:8px;border-top-left-radius: 8px",
}, },
{ {
...@@ -84,7 +83,8 @@ export const supervisorCommonSchemaList = [ ...@@ -84,7 +83,8 @@ export const supervisorCommonSchemaList = [
{ {
name: "displayPreSalesTouchCount", name: "displayPreSalesTouchCount",
label: "触客数", label: "触客数",
colStyle: "flex: 1 0 calc((100%) / 3);margin-right:0;margin-bottom:4px;margin-top:8px", colStyle: "flex: 1 0 calc((100%) / 3);margin-right:0;margin-bottom:4px;margin-top:8px;border-top-right-radius: 8px;",
}, },
{ {
......
<template> <template>
<van-pull-refresh v-model="list.loading" <van-pull-refresh v-model="list.refreshing"
class="pull-refresh-wrapper" class="pull-refresh-wrapper"
@refresh="handleResetList"> @refresh="handleResetList">
<div class="filter-wrapper"> <div class="filter-wrapper">
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
@change="getData()" /> @change="getData()" />
</div> </div>
<div class="date-filter"> <div class="date-filter">
<DateTypeTabs v-model="list.query.dateType" /> <DateTypeTabs v-model="list.query.dateType" style="flex:1 auto" />
<DatePicker v-model="list.query.date" <DatePicker v-model="list.query.date"
style="margin-left:16px" style="margin-left:16px"
:type="options.dateType[list.query.dateType]" :type="options.dateType[list.query.dateType]"
@change="getData()" /> @change="handleDatePickerChange" />
</div> </div>
<div v-if="[1, 2].includes(list.query.dateType)" class="static-wrapper"> <div v-if="[1, 2].includes(list.query.dateType)" class="static-wrapper">
...@@ -63,9 +63,15 @@ ...@@ -63,9 +63,15 @@
</div> </div>
</template> </template>
</StatisticsItem> </StatisticsItem>
<div class="last-tips">
到底了~
</div>
</template> </template>
<template v-else> <template v-else>
<Empty description="暂无门店" /> <Empty v-if="list.data.length === 0 && !list.loading && !list.refreshing"
description="暂无数据"
image-size="100"
:image="`${IMG_URL}icon-empty.png`" />
</template> </template>
</div> </div>
...@@ -87,12 +93,12 @@ import SvgIcon from "@/components/svgIcon/index.vue"; ...@@ -87,12 +93,12 @@ import SvgIcon from "@/components/svgIcon/index.vue";
import { getStorePerformance } from "@/views/performance/api"; import { getStorePerformance } from "@/views/performance/api";
import StatisticsItem from "@/views/performance/components/statisticsItem/statisticsItem.vue"; import StatisticsItem from "@/views/performance/components/statisticsItem/statisticsItem.vue";
import WarnList from "@/views/performance/components/warnList/index.vue"; import WarnList from "@/views/performance/components/warnList/index.vue";
import { brandTypeList, staticInfoList } from "@/views/performance/constant/performance"; import { BASE_IMG_URL, brandTypeList, staticInfoList } from "@/views/performance/constant/performance";
import BrandTabs from "../brandTabs/index.vue"; import BrandTabs from "../brandTabs/index.vue";
import { supervisorCommonSchemaList, supervisorSchemaList } from "./index.data"; import { supervisorCommonSchemaList, supervisorSchemaList } from "./index.data";
export default { export default {
name: "StorePerformance", name: "StoreTabItem",
components: { components: {
Empty, Empty,
SvgIcon, SvgIcon,
...@@ -108,6 +114,8 @@ export default { ...@@ -108,6 +114,8 @@ export default {
data() { data() {
return { return {
throttledFilterSearchKeyword: null, throttledFilterSearchKeyword: null,
IMG_URL: BASE_IMG_URL,
picker: { picker: {
region: { region: {
show: false, show: false,
...@@ -129,6 +137,7 @@ export default { ...@@ -129,6 +137,7 @@ export default {
}, },
list: { list: {
loading: false, loading: false,
refreshing: false,
statistics: {}, statistics: {},
originData: [], originData: [],
data: [], data: [],
...@@ -157,6 +166,10 @@ export default { ...@@ -157,6 +166,10 @@ export default {
this.throttledFilterSearchKeyword?.cancel?.(); this.throttledFilterSearchKeyword?.cancel?.();
}, },
methods: { methods: {
async handleDatePickerChange(e) {
console.log("e", e);
await this.getData();
},
async handleChangeRegion(row) { async handleChangeRegion(row) {
console.log(row); console.log(row);
if (!row) { if (!row) {
...@@ -197,6 +210,7 @@ export default { ...@@ -197,6 +210,7 @@ export default {
}; };
}, },
async getData() { async getData() {
this.list.loading = true;
this.$loading.show(); this.$loading.show();
try { try {
this.list.data = []; this.list.data = [];
...@@ -208,6 +222,7 @@ export default { ...@@ -208,6 +222,7 @@ export default {
this.list.data = this.afterGetData(data.storeList); this.list.data = this.afterGetData(data.storeList);
} finally { } finally {
this.$loading.hide(); this.$loading.hide();
this.list.loading = false;
} }
}, },
afterGetData(list) { afterGetData(list) {
...@@ -239,9 +254,12 @@ export default { ...@@ -239,9 +254,12 @@ export default {
}); });
}, },
async handleResetList() { async handleResetList() {
this.list.loading = true; this.list.refreshing = true;
await this.getData(); try {
this.list.loading = false; await this.getData();
} finally {
this.list.refreshing = false;
}
}, },
search() {}, search() {},
}, },
...@@ -249,7 +267,13 @@ export default { ...@@ -249,7 +267,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pull-refresh-wrapper { .last-tips {
color: #969799;
font-size: 14px;
line-height: 50px;
text-align: center;
}
.pull-refresh-wrapper {
height: 100%; height: 100%;
overflow: auto !important; overflow: auto !important;
box-sizing: border-box; box-sizing: border-box;
......
<template> <template>
<van-pull-refresh v-model="list.loading" <van-pull-refresh v-model="list.refreshing"
class="pull-refresh-wrapper" class="pull-refresh-wrapper"
@refresh="handleResetList"> @refresh="handleResetList">
<div class="filter-wrapper"> <div class="filter-wrapper">
<div class="brand-filter"> <div class="brand-filter">
<BrandTabs v-model="list.query.statDimension" <BrandTabs v-model="list.query.statDimension"
:list="options.brandTypeList" :list="options.brandTypeList"
@change="getData()" /> @change="handleBrandTabsChange" />
</div> </div>
<div class="date-filter"> <div class="date-filter">
<DateTypeTabs v-model="list.query.dateType" /> <DateTypeTabs v-model="list.query.dateType" style="flex:1 auto" />
<DatePicker v-model="list.query.date" <DatePicker v-model="list.query.date"
style="margin-left:16px" style="margin-left:16px"
:type="options.dateType[list.query.dateType]" :type="options.dateType[list.query.dateType]"
@change="getData()" /> @change="handleDatePickerChange" />
</div> </div>
<!-- <div class="static-wrapper"> <!-- <div class="static-wrapper">
...@@ -38,9 +38,15 @@ ...@@ -38,9 +38,15 @@
:sub-title="item.merchantName" :sub-title="item.merchantName"
:title="item.supervisorName" :title="item.supervisorName"
@tap="handleTapItem(item)" /> @tap="handleTapItem(item)" />
<div class="last-tips">
到底了~
</div>
</template> </template>
<template v-else> <template v-else>
<Empty description="暂无督导" /> <Empty v-if="list.data.length === 0 && !list.loading && !list.refreshing"
description="暂无数据"
image-size="100"
:image="`${IMG_URL}icon-empty.png`" />
</template> </template>
</div> </div>
</div> </div>
...@@ -58,12 +64,12 @@ import SearchInput from "@/components/searchBar/index.vue"; ...@@ -58,12 +64,12 @@ import SearchInput from "@/components/searchBar/index.vue";
import StaticInfo from "@/components/staticInfo/index.vue"; import StaticInfo from "@/components/staticInfo/index.vue";
import { getSupervisorPerformance } from "@/views/performance/api"; import { getSupervisorPerformance } from "@/views/performance/api";
import StatisticsItem from "@/views/performance/components/statisticsItem/statisticsItem.vue"; import StatisticsItem from "@/views/performance/components/statisticsItem/statisticsItem.vue";
import { brandTypeList, staticInfoList } from "@/views/performance/constant/performance"; import { BASE_IMG_URL, brandTypeList, staticInfoList } from "@/views/performance/constant/performance";
import BrandTabs from "../brandTabs/index.vue"; import BrandTabs from "../brandTabs/index.vue";
import { supervisorCommonSchemaList, supervisorSchemaList } from "./index.data"; import { supervisorCommonSchemaList, supervisorSchemaList } from "./index.data";
export default { export default {
name: "PerformanceOverview", name: "SupervisorTabItem",
components: { components: {
BrandTabs, BrandTabs,
DatePicker, DatePicker,
...@@ -75,6 +81,7 @@ export default { ...@@ -75,6 +81,7 @@ export default {
data() { data() {
return { return {
throttledFilterSearchKeyword: null, throttledFilterSearchKeyword: null,
IMG_URL: BASE_IMG_URL,
options: { options: {
brandTypeList, brandTypeList,
staticInfoList, staticInfoList,
...@@ -89,6 +96,7 @@ export default { ...@@ -89,6 +96,7 @@ export default {
}, },
list: { list: {
loading: false, loading: false,
refreshing: false,
originData: [], originData: [],
data: [], data: [],
query: { query: {
...@@ -108,6 +116,7 @@ export default { ...@@ -108,6 +116,7 @@ export default {
}, 300); }, 300);
}, },
async mounted() { async mounted() {
await this.getData();
}, },
beforeDestroy() { beforeDestroy() {
this.throttledFilterSearchKeyword?.cancel?.(); this.throttledFilterSearchKeyword?.cancel?.();
...@@ -125,7 +134,8 @@ export default { ...@@ -125,7 +134,8 @@ export default {
}; };
}, },
async getData() { async getData() {
console.log("??"); console.log("parent");
this.list.loading = true;
this.$loading.show(); this.$loading.show();
try { try {
this.list.data = []; this.list.data = [];
...@@ -136,6 +146,7 @@ export default { ...@@ -136,6 +146,7 @@ export default {
this.list.data = this.afterGetData(list); this.list.data = this.afterGetData(list);
} finally { } finally {
this.$loading.hide(); this.$loading.hide();
this.list.loading = false;
} }
}, },
afterGetData(list) { afterGetData(list) {
...@@ -149,6 +160,14 @@ export default { ...@@ -149,6 +160,14 @@ export default {
return this.list.originData.filter(item => item?.supervisorName?.includes(keyword)); return this.list.originData.filter(item => item?.supervisorName?.includes(keyword));
}, },
async handleDatePickerChange(e) {
console.log("handleDatePickerChange", e);
await this.getData();
},
async handleBrandTabsChange(e) {
console.log("handleBrandTabsChange", e);
await this.getData();
},
handleTapItem(row) { handleTapItem(row) {
this.$router.push({ this.$router.push({
name: "supervisorOutlet", name: "supervisorOutlet",
...@@ -168,9 +187,12 @@ export default { ...@@ -168,9 +187,12 @@ export default {
}); });
}, },
async handleResetList() { async handleResetList() {
this.list.loading = true; this.list.refreshing = true;
await this.getData(); try {
this.list.loading = false; await this.getData();
} finally {
this.list.refreshing = false;
}
}, },
search() {}, search() {},
}, },
...@@ -178,7 +200,13 @@ export default { ...@@ -178,7 +200,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pull-refresh-wrapper { .last-tips {
color: #969799;
font-size: 14px;
line-height: 50px;
text-align: center;
}
.pull-refresh-wrapper {
height: 100%; height: 100%;
overflow: auto !important; overflow: auto !important;
box-sizing: border-box; box-sizing: border-box;
...@@ -212,7 +240,7 @@ export default { ...@@ -212,7 +240,7 @@ export default {
} }
} }
.list-wrapper { .list-wrapper {
padding: 0 12px 20px; padding: 0 12px 0;
> .title-wrapper { > .title-wrapper {
font-weight: 400; font-weight: 400;
......
...@@ -18,6 +18,7 @@ export const brandTypeList = [ ...@@ -18,6 +18,7 @@ export const brandTypeList = [
}, },
}, },
]; ];
export const BASE_IMG_URL = "https://img02.glsx.com.cn/weapp/resource/supervise-wecom/";
export const staticInfoList = [ export const staticInfoList = [
{ {
......
...@@ -58,16 +58,23 @@ export default { ...@@ -58,16 +58,23 @@ export default {
min-height: 0; min-height: 0;
.van-tab { .van-tab {
flex: none; flex: none;
font-weight: 500;
line-height: 20px; line-height: 20px;
margin-left: 16px; margin-left: 16px;
font-size: 14px;
font-weight: 600;
transition: font-size 200ms;
&:first-child { &:first-child {
margin-left: 0; margin-left: 0;
} }
&__text { &__text {
color: #333333;
} }
&--active { &--active {
color: var(--themeColor); font-size: 17px !important;
.van-tab__text {
color: var(--themeColor);
}
} }
&__pane-wrapper { &__pane-wrapper {
height: 100%; height: 100%;
......
...@@ -3,7 +3,8 @@ export const supervisorSchemaList = [ ...@@ -3,7 +3,8 @@ export const supervisorSchemaList = [
{ {
name: "displayTotalOutput", name: "displayTotalOutput",
label: "总产值(万)", label: "总产值(万)",
colStyle: "flex: 1 0 calc((100% - 16px) / 3);margin-bottom:4px;margin-top:8px", colStyle: "flex: 1 0 calc((100% - 16px) / 3);margin-bottom:4px;margin-top:8px;border-top-left-radius: 8px",
}, },
{ {
name: "displayDeliveryCount", name: "displayDeliveryCount",
...@@ -13,7 +14,8 @@ export const supervisorSchemaList = [ ...@@ -13,7 +14,8 @@ export const supervisorSchemaList = [
{ {
name: "displayPreSalesTouchCount", name: "displayPreSalesTouchCount",
label: "触客数", label: "触客数",
colStyle: "flex: 1 0 calc((100%) / 3);margin-right:0;margin-bottom:4px;margin-top:8px", colStyle: "flex: 1 0 calc((100%) / 3);margin-right:0;margin-bottom:4px;margin-top:8px;border-top-right-radius: 8px;",
}, },
{ {
......
<template> <template>
<van-pull-refresh v-model="list.loading" <van-pull-refresh v-model="list.refreshing"
class="pull-refresh-wrapper" class="pull-refresh-wrapper"
@refresh="handleResetList"> @refresh="handleResetList">
<div class="filter-wrapper"> <div class="filter-wrapper">
<div class="brand-filter"> <div class="brand-filter">
<BrandTabs v-model="list.query.supervisorId" <BrandTabs v-model="list.query.supervisorId"
:list="options.brandTypeList" :list="options.brandTypeList"
@change="getData()" /> @change="handleBrandTabsChange" />
</div> </div>
<div class="date-filter"> <div class="date-filter">
<DateTypeTabs v-model="list.query.dateType" /> <DateTypeTabs v-model="list.query.dateType" style="flex:1 auto" />
<DatePicker v-model="list.query.date" <DatePicker v-model="list.query.date"
style="margin-left:16px" style="margin-left:16px"
:type="options.dateType[list.query.dateType]" :type="options.dateType[list.query.dateType]"
@change="getData()" /> @change="handleDatePickerChange" />
</div> </div>
<div v-if="[1, 2].includes(list.query.dateType)" class="static-wrapper"> <div v-if="[1, 2].includes(list.query.dateType)" class="static-wrapper">
...@@ -50,9 +50,15 @@ ...@@ -50,9 +50,15 @@
</div> </div>
</template> </template>
</StatisticsItem> </StatisticsItem>
<div class="last-tips">
到底了~
</div>
</template> </template>
<template v-else> <template v-else>
<Empty description="暂无门店" /> <Empty v-if="list.data.length === 0 && !list.loading && !list.refreshing"
description="暂无数据"
image-size="100"
:image="`${IMG_URL}icon-empty.png`" />
</template> </template>
</div> </div>
...@@ -74,11 +80,11 @@ import { getSupervisorStorePerformance } from "@/views/performance/api"; ...@@ -74,11 +80,11 @@ import { getSupervisorStorePerformance } from "@/views/performance/api";
import BrandTabs from "@/views/performance/components/brandTabs/index.vue"; import BrandTabs from "@/views/performance/components/brandTabs/index.vue";
import StatisticsItem from "@/views/performance/components/statisticsItem/statisticsItem.vue"; import StatisticsItem from "@/views/performance/components/statisticsItem/statisticsItem.vue";
import WarnList from "@/views/performance/components/warnList/index.vue"; import WarnList from "@/views/performance/components/warnList/index.vue";
import { staticInfoList, storeWarnList } from "@/views/performance/constant/performance"; import { BASE_IMG_URL, staticInfoList, storeWarnList } from "@/views/performance/constant/performance";
import { supervisorCommonSchemaList, supervisorSchemaList } from "./index.data"; import { supervisorCommonSchemaList, supervisorSchemaList } from "./index.data";
export default { export default {
name: "StorePerformance", name: "SupervisorOutlet",
components: { components: {
Empty, Empty,
SvgIcon, SvgIcon,
...@@ -91,10 +97,9 @@ export default { ...@@ -91,10 +97,9 @@ export default {
WarnList, WarnList,
}, },
data() { data() {
console.log(" keyBy(storeWarnList, \"key\"),", keyBy(storeWarnList, "key"));
return { return {
throttledFilterSearchKeyword: null, throttledFilterSearchKeyword: null,
IMG_URL: BASE_IMG_URL,
options: { options: {
brandTypeList: [ brandTypeList: [
{ key: undefined, label: "" }, { key: undefined, label: "" },
...@@ -113,6 +118,7 @@ export default { ...@@ -113,6 +118,7 @@ export default {
}, },
list: { list: {
loading: false, loading: false,
refreshing: false,
statistics: {}, statistics: {},
originData: [], originData: [],
data: [], data: [],
...@@ -153,7 +159,7 @@ export default { ...@@ -153,7 +159,7 @@ export default {
}, 300); }, 300);
}, },
async mounted() { async mounted() {
await this.getData();
}, },
beforeDestroy() { beforeDestroy() {
this.throttledFilterSearchKeyword?.cancel?.(); this.throttledFilterSearchKeyword?.cancel?.();
...@@ -174,6 +180,7 @@ export default { ...@@ -174,6 +180,7 @@ export default {
}; };
}, },
async getData() { async getData() {
this.list.loading = true;
this.$loading.show({ delay: 0 }); this.$loading.show({ delay: 0 });
try { try {
this.list.data = []; this.list.data = [];
...@@ -185,8 +192,17 @@ export default { ...@@ -185,8 +192,17 @@ export default {
this.list.data = this.afterGetData(data.storeList); this.list.data = this.afterGetData(data.storeList);
} finally { } finally {
this.$loading.hide(); this.$loading.hide();
this.list.loading = false;
} }
}, },
async handleDatePickerChange(e) {
console.log("handleDatePickerChange", e);
await this.getData();
},
async handleBrandTabsChange(e) {
console.log("handleBrandTabsChange", e);
await this.getData();
},
afterGetData(list) { afterGetData(list) {
return this.filterSearchKeyword(); return this.filterSearchKeyword();
}, },
...@@ -217,9 +233,12 @@ export default { ...@@ -217,9 +233,12 @@ export default {
}); });
}, },
async handleResetList() { async handleResetList() {
this.list.loading = true; this.list.refreshing = true;
await this.getData(); try {
this.list.loading = false; await this.getData();
} finally {
this.list.refreshing = false;
}
}, },
search() {}, search() {},
}, },
...@@ -227,7 +246,13 @@ export default { ...@@ -227,7 +246,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pull-refresh-wrapper { .last-tips {
color: #969799;
font-size: 14px;
line-height: 50px;
text-align: center;
}
.pull-refresh-wrapper {
height: 100%; height: 100%;
overflow: auto !important; overflow: auto !important;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -21,54 +21,53 @@ export const supervisorSchemaList = [ ...@@ -21,54 +21,53 @@ export const supervisorSchemaList = [
{ {
name: "displayVehicleWarrantyRate", name: "displayVehicleWarrantyRate",
label: "整车延保", label: "整车延保",
colStyle: "flex: 0 auto;margin-top:8px", colStyle: "flex: 0 auto;margin-bottom:4px;margin-top:8px;border-top-left-radius: 8px",
tips: "整车延保触客转化率", tips: "整车延保触客转化率",
}, },
{ {
name: "displayPeaceOfMindRate", name: "displayPeaceOfMindRate",
label: "安心包", label: "安心包",
colStyle: "flex:1;margin-top:8px", colStyle: "flex: 1 1 20%;margin-bottom:4px;margin-top:8px",
tips: "安心包触客转化率", tips: "安心包触客转化率",
}, },
{ {
name: "displayBatteryWarrantyRate", name: "displayBatteryWarrantyRate",
label: "电池", label: "电池",
colStyle: "flex:1;margin-top:8px", colStyle: "flex: 1 1 15%;margin-bottom:4px;margin-top:8px",
tips: "电池延保触客转化率", tips: "电池延保触客转化率",
}, },
{ {
name: "displayTireInsuranceRate", name: "displayTireInsuranceRate",
label: "轮胎", label: "轮胎",
colStyle: "flex:1;margin-top:8px", colStyle: "flex: 1 1 15%;margin-right:0;margin-bottom:4px;margin-top:8px;border-top-right-radius: 8px;",
tips: "轮胎险触客转化率", tips: "轮胎险触客转化率",
}, },
{ {
name: "displayVehicleWarrantyAfterSalesRate", name: "displayVehicleWarrantyAfterSalesRate",
label: "整车延保售后成交/总成交", label: "整车延保售后成交/总成交",
colStyle: "flex: 1 0 calc((100% - 8px) / 2);margin-bottom:4px ", colStyle: "flex: 1 0 calc((100% - 6px) / 2); ",
isMore: true,
}, },
{ {
name: "displayPeaceOfMindAfterSalesRate", name: "displayPeaceOfMindAfterSalesRate",
label: "安心包售后成交/总成交", label: "安心包售后成交/总成交",
colStyle: "flex: 1 0 calc((100% - 8px) / 2); margin-right:0; margin-bottom:4px", colStyle: "flex: 1 0 calc((100% - 6px) / 2); margin-right:0; ",
isMore: true,
}, },
{ {
name: "displayBatteryAfterSalesRate", name: "displayBatteryAfterSalesRate",
label: "电池售后成交/总成交", label: "电池售后成交/总成交",
colStyle: "flex: 1 0 calc((100% - 8px) / 2);margin-bottom:4px ", colStyle: "flex: 1 0 calc((100% - 6px) / 2); ",
isMore: true, isMore: true,
}, },
{ {
name: "displayTireInsuranceAfterSalesRate", name: "displayTireInsuranceAfterSalesRate",
label: "轮胎售后成交/总成交", label: "轮胎售后成交/总成交",
colStyle: "flex: 1 0 calc((100% - 8px) / 2); margin-right:0; margin-bottom:4px", colStyle: "flex: 1 0 calc((100% - 6px) / 2); margin-right:0; ",
isMore: true, isMore: true,
}, },
...@@ -97,41 +96,42 @@ export const supervisorCommonSchemaList = [ ...@@ -97,41 +96,42 @@ export const supervisorCommonSchemaList = [
{ {
name: "displayTouchConversionRate", name: "displayTouchConversionRate",
label: "触客成交率", label: "触客成交率",
colStyle: "flex: 0 auto;margin-top:8px", colStyle: "flex: 0 auto;margin-bottom:4px;margin-top:8px;border-top-left-radius: 8px",
}, },
{ {
name: "displayWarrantyRate", name: "displayWarrantyRate",
label: "延保", label: "延保",
colStyle: "flex:1;margin-top:8px", colStyle: "flex: 1 1 15%;margin-bottom:4px;margin-top:8px",
tips: "延保触客转化率", tips: "延保触客转化率",
}, },
{ {
name: "displayEquityProductRate", name: "displayEquityProductRate",
label: "权益商品", label: "权益商品",
colStyle: "flex:1;margin-top:8px", colStyle: "flex: 1 1 20%;margin-bottom:4px;margin-top:8px",
tips: "权益商品触客转化率", tips: "权益商品触客转化率",
}, },
{ {
name: "displayEquityRate", name: "displayEquityRate",
label: "权益", label: "权益",
colStyle: "flex:1;margin-top:8px", colStyle: "flex: 1 1 15%;margin-right:0;margin-bottom:4px;margin-top:8px;border-top-right-radius: 8px;",
tips: "权益触客转化率", tips: "权益触客转化率",
}, },
{ {
name: "displayWarrantyAfterSalesRate", name: "displayWarrantyAfterSalesRate",
label: "延保售后成交/总成交", label: "延保售后成交/总成交",
colStyle: "flex: 1 0 calc((100% - 8px) / 2);margin-bottom:4px ", colStyle: "flex: 1 0 calc((100% - 6px) / 2); ",
isMore: true,
}, },
{ {
name: "displayEquityProductAfterSalesRate", name: "displayEquityProductAfterSalesRate",
label: "权益商品售后成交/总成交", label: "权益商品售后成交/总成交",
colStyle: "flex: 1 0 calc((100% - 8px) / 2); margin-right:0; margin-bottom:4px", colStyle: "flex: 1 0 calc((100% - 6px) / 2); margin-right:0; ",
isMore: true,
}, },
{ {
name: "displayEquityAfterSalesRate", name: "displayEquityAfterSalesRate",
......
<template> <template>
<van-pull-refresh v-model="list.loading" <van-pull-refresh v-model="list.refreshing"
class="pull-refresh-wrapper" class="pull-refresh-wrapper"
@refresh="handleResetList"> @refresh="handleResetList">
<div class="filter-wrapper"> <div class="filter-wrapper">
<div class="brand-filter"> <div class="brand-filter">
<BrandTabs v-model="list.query.statDimension" <BrandTabs v-model="list.query.statDimension"
:list="options.brandTypeList" :list="options.brandTypeList"
@change="getData()" /> @change="handleBrandTabsChange" />
</div> </div>
<div class="date-filter"> <div class="date-filter">
<DateTypeTabs v-model="list.query.dateType" /> <DateTypeTabs v-model="list.query.dateType" style="flex:1 auto" />
<DatePicker v-model="list.query.date" <DatePicker v-model="list.query.date"
style="margin-left:16px" style="margin-left:16px"
:type="options.dateType[list.query.dateType]" :type="options.dateType[list.query.dateType]"
@change="getData()" /> @change="handleDatePickerChange" />
</div> </div>
<!-- <div class="static-wrapper"> <!-- <div class="static-wrapper">
...@@ -40,9 +40,15 @@ ...@@ -40,9 +40,15 @@
:schema="list.query.statDimension === '1' ? options.supervisorSchemaList : options.supervisorCommonSchemaList" :schema="list.query.statDimension === '1' ? options.supervisorSchemaList : options.supervisorCommonSchemaList"
:sub-title="item.merchantName" :sub-title="item.merchantName"
:title="item.employeeName" /> :title="item.employeeName" />
<div class="last-tips">
到底了~
</div>
</template> </template>
<template v-else> <template v-else>
<Empty description="暂无驻店销售" /> <Empty v-if="list.data.length === 0 && !list.loading && !list.refreshing"
description="暂无数据"
image-size="100"
:image="`${IMG_URL}icon-empty.png`" />
</template> </template>
</div> </div>
...@@ -62,12 +68,12 @@ import StaticInfo from "@/components/staticInfo/index.vue"; ...@@ -62,12 +68,12 @@ import StaticInfo from "@/components/staticInfo/index.vue";
import { getSupervisorStoreStaffPerformance } from "@/views/performance/api"; import { getSupervisorStoreStaffPerformance } from "@/views/performance/api";
import BrandTabs from "@/views/performance/components/brandTabs/index.vue"; import BrandTabs from "@/views/performance/components/brandTabs/index.vue";
import StatisticsItem from "@/views/performance/components/statisticsItem/statisticsItem.vue"; import StatisticsItem from "@/views/performance/components/statisticsItem/statisticsItem.vue";
import { staticInfoList } from "@/views/performance/constant/performance"; import { BASE_IMG_URL, staticInfoList } from "@/views/performance/constant/performance";
import { supervisorCommonSchemaList, supervisorSchemaList } from "./index.data"; import { supervisorCommonSchemaList, supervisorSchemaList } from "./index.data";
export default { export default {
name: "PerformanceOverview", name: "SupervisorOutletStaff",
components: { components: {
BrandTabs, BrandTabs,
DatePicker, DatePicker,
...@@ -80,6 +86,7 @@ export default { ...@@ -80,6 +86,7 @@ export default {
data() { data() {
return { return {
throttledFilterSearchKeyword: null, throttledFilterSearchKeyword: null,
IMG_URL: BASE_IMG_URL,
options: { options: {
brandTypeList: [ brandTypeList: [
{ key: undefined, label: "" }, { key: undefined, label: "" },
...@@ -96,6 +103,7 @@ export default { ...@@ -96,6 +103,7 @@ export default {
}, },
list: { list: {
loading: false, loading: false,
refreshing: false,
originData: [], originData: [],
data: [], data: [],
query: { query: {
...@@ -134,12 +142,20 @@ export default { ...@@ -134,12 +142,20 @@ export default {
}, 300); }, 300);
}, },
async mounted() { async mounted() {
await this.getData();
}, },
beforeDestroy() { beforeDestroy() {
this.throttledFilterSearchKeyword?.cancel?.(); this.throttledFilterSearchKeyword?.cancel?.();
}, },
methods: { methods: {
async handleDatePickerChange(e) {
console.log("handleDatePickerChange", e);
await this.getData();
},
async handleBrandTabsChange(e) {
console.log("handleBrandTabsChange", e);
await this.getData();
},
getItemSubTitle(rows) { getItemSubTitle(rows) {
return rows?.storeList?.map(i => i.merchantName).join("、"); return rows?.storeList?.map(i => i.merchantName).join("、");
}, },
...@@ -153,6 +169,8 @@ export default { ...@@ -153,6 +169,8 @@ export default {
}, },
async getData() { async getData() {
this.$loading.show({ delay: 0 }); this.$loading.show({ delay: 0 });
this.list.loading = true;
try { try {
this.list.data = []; this.list.data = [];
this.list.originData = []; this.list.originData = [];
...@@ -162,6 +180,7 @@ export default { ...@@ -162,6 +180,7 @@ export default {
this.list.data = this.afterGetData(list); this.list.data = this.afterGetData(list);
} finally { } finally {
this.$loading.hide(); this.$loading.hide();
this.list.loading = false;
} }
}, },
afterGetData(list) { afterGetData(list) {
...@@ -172,7 +191,6 @@ export default { ...@@ -172,7 +191,6 @@ export default {
if (!keyword) { if (!keyword) {
return this.list.originData; return this.list.originData;
} }
return this.list.originData.filter(item => item?.employeeName?.includes(keyword)); return this.list.originData.filter(item => item?.employeeName?.includes(keyword));
}, },
handleTapItem(row) { handleTapItem(row) {
...@@ -186,9 +204,12 @@ export default { ...@@ -186,9 +204,12 @@ export default {
}); });
}, },
async handleResetList() { async handleResetList() {
this.list.loading = true; this.list.refreshing = true;
await this.getData(); try {
this.list.loading = false; await this.getData();
} finally {
this.list.refreshing = false;
}
}, },
search() {}, search() {},
}, },
...@@ -196,7 +217,13 @@ export default { ...@@ -196,7 +217,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pull-refresh-wrapper { .last-tips {
color: #969799;
font-size: 14px;
line-height: 50px;
text-align: center;
}
.pull-refresh-wrapper {
height: 100%; height: 100%;
overflow: auto !important; overflow: auto !important;
box-sizing: border-box; box-sizing: border-box;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!