Commit 39e2daea authored by 黄奎's avatar 黄奎

页面修改

parent 1ea7173c
...@@ -8,25 +8,15 @@ ...@@ -8,25 +8,15 @@
</div> </div>
<div class="content"> <div class="content">
<div style="display: flex;flex-direction: row;align-items: center"> <div style="display: flex;flex-direction: row;align-items: center">
<el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.Source" size="small" placeholder="请选择"> <el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.Source" size="small"
<el-option placeholder="请选择">
v-for="item in options" <el-option v-for="item in options" :key="item.Id" :label="item.Name" :value="item.Id">
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option> </el-option>
</el-select> </el-select>
<div class="block"> <div class="block">
<el-date-picker <el-date-picker style="padding: 3px 10px;width: 380px;height: 32px" v-model="value" type="daterange"
style="padding: 3px 10px;width: 380px;height: 32px" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd"
v-model="value" @change="getList" align="right">
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="getList"
align="right">
</el-date-picker> </el-date-picker>
</div> </div>
<el-tabs v-model="activeName" @tab-click="handleClick" style="margin-left: 20px"> <el-tabs v-model="activeName" @tab-click="handleClick" style="margin-left: 20px">
...@@ -74,37 +64,17 @@ ...@@ -74,37 +64,17 @@
</div> </div>
<div style="padding: 20px;background: #fff;margin-top: 10px"> <div style="padding: 20px;background: #fff;margin-top: 10px">
<el-table <el-table v-loading="loading" :data="tableData" header-cell-class-name="headClass" style="width: 100%;">
v-loading="loading" <el-table-column prop="TimeStr" label="日期" min-width="2">
:data="tableData"
header-cell-class-name="headClass"
style="width: 100%;"
>
<el-table-column
prop="TimeStr"
label="日期"
width="342">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Pink" label="普象会员" min-width="2">
prop="Pink"
label="普象会员"
width="339">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="VIP" label="VIP会员" min-width="2">
prop="VIP"
label="VIP会员"
width="339">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Silver" label="银象" min-width="2">
prop="Silver"
label="银象"
width="339">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="Gold" label="金象" min-width="2">
prop="Gold"
label="金象"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
...@@ -113,74 +83,77 @@ ...@@ -113,74 +83,77 @@
<script> <script>
export default { export default {
data(){ data() {
return{ return {
msg:{ msg: {
  Source:0, Source: 0,
StartDate:'', StartDate: '',
EndDate:'', EndDate: '',
}, },
loading:false, loading: false,
options:[], options: [],
tableData:[], tableData: [],
count:0, count: 0,
value:'', value: '',
activeName:'', activeName: '',
//总客户和今日用户 //总客户和今日用户
UserData:[], UserData: [],
} }
}, },
created(){ created() {
this.getplat(); this.getplat();
this.getMallDistri(); this.getMallDistri();
this.getList(); this.getList();
}, },
methods:{ methods: {
//获取顶部客户统计 //获取顶部客户统计
getMallDistri(){ getMallDistri() {
this.apipost("/api/Tenant/MallDistributorStatistics", {}, res => { this.apipost("/api/Tenant/MallDistributorStatistics", {}, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.UserData = res.data.data; this.UserData = res.data.data;
}else{ } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) })
}, },
//获取平台 //获取平台
getplat(){ getplat() {
this.apipost("/api/User/GetMemberUserSourceEnumList", {}, res => { this.apipost("/api/User/GetMemberUserSourceEnumList", {}, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.options = res.data.data; this.options = res.data.data;
this.options.unshift({Name: "全部平台", Id: 0}) this.options.unshift({
Name: "全部平台",
Id: 0
})
} }
}) })
}, },
//获取列表 //获取列表
getList(){ getList() {
if(this.value!='' && this.value != null){ if (this.value != '' && this.value != null) {
this.msg.StartDate = this.value[0]; this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1]; this.msg.EndDate = this.value[1];
}else{ } else {
this.msg.StartDate = ''; this.msg.StartDate = '';
this.msg.EndDate = ''; this.msg.EndDate = '';
} }
this.loading=true; this.loading = true;
this.apipost("/api/Tenant/MallDistributorDayStatistics", this.msg, res => { this.apipost("/api/Tenant/MallDistributorDayStatistics", this.msg, res => {
this.loading=false this.loading = false
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.tableData = res.data.data; this.tableData = res.data.data;
}else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}) })
}, },
Export(){ Export() {
let msg = { let msg = {
PlatformType:this.msg.PlatformType, PlatformType: this.msg.PlatformType,
StartDate :this.msg.StartDate , StartDate: this.msg.StartDate,
EndDate :this.msg.EndDate, EndDate: this.msg.EndDate,
OrderType :this.msg.OrderType, OrderType: this.msg.OrderType,
} }
msg = JSON.parse(JSON.stringify(msg)); msg = JSON.parse(JSON.stringify(msg));
...@@ -190,20 +163,20 @@ ...@@ -190,20 +163,20 @@
"销售统计.xls" "销售统计.xls"
); );
}, },
empty(){ empty() {
this.msg.Source=0; this.msg.Source = 0;
this.value=''; this.value = '';
this.getList(); this.getList();
}, },
handleClick(tab, event) { handleClick(tab, event) {
if(tab.name=='first'){ if (tab.name == 'first') {
this.fun_date(7) this.fun_date(7)
}else if(tab.name=='second'){ } else if (tab.name == 'second') {
this.fun_date(30) this.fun_date(30)
} }
}, },
fun_date(num){ fun_date(num) {
let that= this let that = this
let date1 = new Date(); let date1 = new Date();
//今天时间 //今天时间
let time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate() let time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate()
...@@ -219,69 +192,81 @@ ...@@ -219,69 +192,81 @@
this.getList(); this.getList();
}, },
}, },
mounted(){ mounted() {
} }
} }
</script>
<style > </script>
.salesStatistics .el-card__header{ <style>
.salesStatistics .el-card__header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
background: #fff; background: #fff;
} }
.salesStatistics .el-button--small{
.salesStatistics .el-button--small {
padding: 9px 15px; padding: 9px 15px;
} }
.salesStatistics .content .searchInput{
.salesStatistics .content .searchInput {
border: 1px solid #DCDFE6; border: 1px solid #DCDFE6;
border-radius: 4px; border-radius: 4px;
} }
.salesStatistics .content .searchInput .el-input__inner{
border:none;outline:none; .salesStatistics .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.salesStatistics .content .searchInput{
.salesStatistics .content .searchInput {
line-height: normal; line-height: normal;
display: inline-table; display: inline-table;
border-collapse: separate; border-collapse: separate;
border-spacing: 0; border-spacing: 0;
width:250px; width: 250px;
margin-right: 20px; margin-right: 20px;
} }
.salesStatistics .content{
.salesStatistics .content {
background: #fff; background: #fff;
margin-top:10px; margin-top: 10px;
padding: 15px; padding: 15px;
box-sizing: border-box; box-sizing: border-box;
} }
.salesStatistics .el-icon-date{
.salesStatistics .el-icon-date {
line-height: 24px; line-height: 24px;
} }
.salesStatistics .el-range-separator{
.salesStatistics .el-range-separator {
line-height: 24px; line-height: 24px;
} }
.salesStatistics .zong{
.salesStatistics .zong {
width: 100%; width: 100%;
height: 57px; height: 57px;
padding: 18px 20px; padding: 18px 20px;
border-bottom: 1px solid #EBEEF5; border-bottom: 1px solid #EBEEF5;
background: white; background: white;
} }
.salesStatistics .table-area {
.salesStatistics .table-area {
margin: 10px 0; margin: 10px 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.salesStatistics .table-area .el-card { .salesStatistics .table-area .el-card {
width: 49.5%; width: 49.5%;
color: #303133; color: #303133;
} }
.salesStatistics .el-card { .salesStatistics .el-card {
border: 1px solid #EBEEF5; border: 1px solid #EBEEF5;
background-color: #FFF; background-color: #FFF;
...@@ -289,15 +274,18 @@ ...@@ -289,15 +274,18 @@
-webkit-transition: .3s; -webkit-transition: .3s;
transition: .3s; transition: .3s;
} }
.salesStatistics .el-card__header { .salesStatistics .el-card__header {
padding: 18px 20px; padding: 18px 20px;
border-bottom: 1px solid #EBEEF5; border-bottom: 1px solid #EBEEF5;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
} }
.salesStatistics .el-card__body { .salesStatistics .el-card__body {
padding: 20px; padding: 20px;
} }
.salesStatistics .num-info { .salesStatistics .num-info {
display: flex; display: flex;
width: 100%; width: 100%;
...@@ -306,13 +294,16 @@ ...@@ -306,13 +294,16 @@
color: #303133; color: #303133;
margin: 20px 0; margin: 20px 0;
} }
.salesStatistics .num-info .num-info-item { .salesStatistics .num-info .num-info-item {
text-align: center; text-align: center;
flex-grow: 1; flex-grow: 1;
border-left: 1px dashed #EFF1F7; border-left: 1px dashed #EFF1F7;
} }
.salesStatistics .info-item-name { .salesStatistics .info-item-name {
font-size: 14px; font-size: 14px;
color: #92959B; color: #92959B;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment