Commit b1883ddc by Jaxon

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

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