Commit 105c4d8b authored by Mac's avatar Mac

1

parent 9f5a9d32
...@@ -91,6 +91,10 @@ ...@@ -91,6 +91,10 @@
<el-tag v-if="item.OrderStatus==7" style="margin-left:5px" size="small" type="danger">已取消</el-tag> <el-tag v-if="item.OrderStatus==7" style="margin-left:5px" size="small" type="danger">已取消</el-tag>
</div> </div>
<div style="position: absolute;right: 15px;top: 19px;" v-if="item.IsOrderCommission==2 && currentUserInfo && currentUserInfo.EmpId == 5">
<el-button @click="resetrakeback(item)" style="width: 100px;height: 30px;" size="small" type="primary">重置订单返佣</el-button>
</div>
</div> </div>
</div> </div>
<div class="app-order-body"> <div class="app-order-body">
...@@ -300,7 +304,8 @@ export default { ...@@ -300,7 +304,8 @@ export default {
moresendtips:'', moresendtips:'',
hszDig:false, hszDig:false,
hszMsg:{}, hszMsg:{},
commonNum:0 commonNum:0,
currentUserInfo:{}
} }
}, },
created(){ created(){
...@@ -309,6 +314,8 @@ export default { ...@@ -309,6 +314,8 @@ export default {
this.msgId = 3; this.msgId = 3;
this.msgVal = this.msg.UserId this.msgVal = this.msg.UserId
} }
this.currentUserInfo = JSON.parse(localStorage.mall_userInfo);
this.getList(); this.getList();
this.getplat(); this.getplat();
// this.getDown(); // this.getDown();
...@@ -498,6 +505,35 @@ export default { ...@@ -498,6 +505,35 @@ export default {
this.platList=res.data.data; this.platList=res.data.data;
}) })
}, },
resetrakeback(row){//重置订单返佣
let that = this
that.$confirm('确定重置订单返佣?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: '重置订单返佣...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
that.apipost(
"/api/order/SetOrderCommissionInitialize", {OrderId:row.OrderId},
res => {
loading.close();
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getList()
} else {
that.Error(res.data.message);
}
},
);
}).catch(() => {
});
}
}, },
}; };
......
<template>
<div class="monthlyReport">
<div class="el-card__header">
<span>月度报表</span>
</div>
<div class="content">
<el-form label-width="160px">
<el-form-item label="更新时间">
<div class="row ">
<span v-if="UserDate==''">暂无更新时间</span>
<span v-else>{{UserDate}}</span>
<el-button type="primary" size="small" style="margin-left: 15px;" @click="initialization">初始化数据
</el-button>
</div>
</el-form-item>
<el-form-item label="时间范围">
<el-date-picker v-model="value" type="daterange" range-separator="至" start-placeholder="开始日期" size="small"
:clearable="false" @change='getdaterange' value-format="yyyy-MM-dd" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="新增下线">
<el-button type="primary" size="small" style="margin-left: 15px;" @click="newAdd">导出
</el-button>
</el-form-item>
<el-form-item label="订单佣金">
<el-button type="primary" size="small" style="margin-left: 15px;" @click="commission">导出
</el-button>
</el-form-item>
<el-form-item label="vip购买">
<el-button type="primary" size="small" style="margin-left: 15px;" @click="vippurchase">导出
</el-button>
</el-form-item>
<el-form-item label="新用户下单">
<el-button type="primary" size="small" style="margin-left: 15px;" @click="newoverbooking">导出
</el-button>
</el-form-item>
</el-form>
</div>
</div>
</template>
<script>
export default {
data() {
return {
UserDate: '',
value: [],
msg: {
StartTime: '',
EndTime: '',
}
}
},
created() {
let date1 = new Date();
//今天时间
let time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate()
this.value = [time1, time1]
this.msg.StartTime = time1;
this.msg.EndTime = time1;
this.getUserReferrals()
},
methods: {
//获取顶部客户统计
getUserReferrals() {
this.apipost("/api/Report/GetUserReferralsNew", {}, res => {
if (res.data.resultCode == 1) {
this.UserDate = res.data.data;
} else {
this.Error(res.data.message);
}
})
},
initialization() {//初始化数据
let that = this;
that.$confirm('确定初始化数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: '更新中,请耐心等待...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
that.apipost(
"/api/Report/SetInitializeReferrals", {},
res => {
loading.close();
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getUserReferrals()
} else {
that.Error(res.data.message);
}
},
);
}).catch(() => {
});
},
getdaterange() {
this.msg.StartTime = this.value[0];
this.msg.EndTime = this.value[1];
},
newAdd() {//新增下线
this.GetLocalFile(
"/api/Report/GetNewReferralsListToExcel",
this.msg,
'新增下线'+this.msg.StartTime+'~'+this.msg.EndTime,
);
},
commission(){//订单佣金
this.GetLocalFile(
"/api/Report/GetOrderCommissionListToExcel",
this.msg,
'订单佣金'+this.msg.StartTime+'~'+this.msg.EndTime,
);
},
vippurchase(){//Vip购买
this.GetLocalFile(
"/api/Report/GetVipBuyListToExcel",
this.msg,
'Vip购买'+this.msg.StartTime+'~'+this.msg.EndTime,
);
},
newoverbooking(){//新用户下单
this.GetLocalFile(
"/api/Report/GetNewUserListToExcel",
this.msg,
'新用户下单'+this.msg.StartTime+'~'+this.msg.EndTime,
);
}
},
mounted() {
}
}
</script>
<style>
.monthlyReport .el-card__header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #fff;
}
.monthlyReport .el-button--small {
padding: 9px 15px;
}
.monthlyReport .content .searchInput {
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.monthlyReport .content .searchInput .el-input__inner {
border: none;
outline: none;
height: 30px;
line-height: 30px;
}
.monthlyReport .content .searchInput {
line-height: normal;
display: inline-table;
border-collapse: separate;
border-spacing: 0;
width: 250px;
margin-right: 20px;
}
.monthlyReport .content {
background: #fff;
margin-top: 10px;
padding: 15px;
box-sizing: border-box;
}
.monthlyReport .el-icon-date {
line-height: 24px;
}
.monthlyReport .el-range-separator {
line-height: 24px;
}
.monthlyReport .zong {
width: 100%;
height: 57px;
padding: 18px 20px;
border-bottom: 1px solid #EBEEF5;
background: white;
}
.monthlyReport .table-area {
margin: 10px 0;
display: flex;
justify-content: space-between;
}
.monthlyReport .table-area .el-card {
width: 49.5%;
color: #303133;
}
.monthlyReport .el-card {
border: 1px solid #EBEEF5;
background-color: #FFF;
color: #303133;
-webkit-transition: .3s;
transition: .3s;
}
.monthlyReport .el-card__header {
padding: 18px 20px;
border-bottom: 1px solid #EBEEF5;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.monthlyReport .el-card__body {
padding: 20px;
}
.monthlyReport .num-info {
display: flex;
width: 100%;
height: 60px;
font-size: 24px;
color: #303133;
margin: 20px 0;
}
.monthlyReport .num-info .num-info-item {
text-align: center;
flex-grow: 1;
border-left: 1px dashed #EFF1F7;
}
.monthlyReport .info-item-name {
font-size: 14px;
color: #92959B;
}
</style>
\ No newline at end of file
...@@ -1495,6 +1495,13 @@ export default new Router({ ...@@ -1495,6 +1495,13 @@ export default new Router({
name: 'cutomerStatistics', name: 'cutomerStatistics',
component: resolve => require(['@/components/statistics/cutomerStatistics'], resolve), component: resolve => require(['@/components/statistics/cutomerStatistics'], resolve),
}, },
//数据统计 月度报表
{
path: '/monthlyReport',
name: 'monthlyReport',
component: resolve => require(['@/components/statistics/monthlyReport'], resolve),
},
//营销中心 充值管理 //营销中心 充值管理
{ {
path: '/rechargeManage', path: '/rechargeManage',
......
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