Commit 14e2721f authored by zhangjianguo's avatar zhangjianguo

完成 分销排行、积分收支、余额收支、充值管理

parent 2352d021
<template>
<div class="addRechargeScheme">
<div class="form-box" style="margin-top: 0">
<div>
<span style="color: rgb(64, 158, 255);cursor: pointer;margin-left: 20px" @click="cancel">充值管理</span>
<span style="margin: 0 5px;color: #C0C4CC;">/</span>
<span>充值编辑</span>
</div>
</div>
<div class="form-box">
<el-form :model="msg" style="padding:0 50px;" :rules="rules" ref="msg" label-width="120px">
<el-form-item label="充值名称" class="is-required" prop="Name">
<el-tooltip class="item" effect="dark" content="在充值管理显示" placement="top"
style="position: absolute;left: -10px;top:13px">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="msg.Name" class="inputM_l"/>
</el-form-item>
<el-form-item label="支付金额" class="is-required" prop="Name">
<el-tooltip class="item" effect="dark" content="用户支付多少就充值多少" placement="top"
style="position: absolute;left: -10px;top:13px">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="msg.Money" class="inputM_l" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,2})?/) ? this.value.match(/\d+(\.\d{0,2})?/)[0] : ''"/>
</el-form-item>
<el-form-item label="赠送金额" >
<el-tooltip class="item" effect="dark" content="用户充值时,赠送的金额,默认为0" placement="top"
style="position: absolute;left: -10px;top:13px">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="msg.GiveMoney" class="inputM_l" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,2})?/) ? this.value.match(/\d+(\.\d{0,2})?/)[0] : ''"/>
</el-form-item>
<el-form-item label="赠送积分" >
<el-tooltip class="item" effect="dark" content="用户充值时,赠送的积分,默认为0" placement="top"
style="position: absolute;left: -10px;top:13px">
<i class="el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="msg.GiveIntegral" class="inputM_l" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,2})?/) ? this.value.match(/\d+(\.\d{0,2})?/)[0] : ''"/>
</el-form-item>
</el-form>
</div>
<el-button type="primary" style="margin: 12px 0 " @click="preserve('msg')" :loading="loading">保存</el-button>
</div>
</template>
<script>
export default {
name: "addRechargeScheme",
data(){
return{
msg:{
Name:'',
Money:'',
GiveMoney:'',
GiveIntegral:'',
},
loading:false,
rules:{
Name: [
{required: true, message: "充值名称不能为空", trigger: "blur"}
],
Money: [
{required: true, message: "支付金额不能为空", trigger: "blur"}
],
}
}
},
created(){
if(this.$route.query.ID){
this.getRechargeRules(this.$route.query.ID)
}
},
methods:{
getRechargeRules(ID){
this.apipost("/api/Recharge/GetRechargeRules",{'ID':ID} , res => {
if (res.data.resultCode == 1) {
this.msg =res.data.data
} else {
this.Info(res.data.message);
}
})
},
cancel(){
this.$router.go(-1)
},
preserve(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.msg.Money =parseInt(this.msg.Money)
if(this.msg.GiveMoney!=''){
this.msg.GiveMoney =parseInt(this.msg.GiveMoney)
}else {
this.msg.GiveMoney=0
}
if(this.msg.GiveIntegral!=''){
this.msg.GiveIntegral =parseInt(this.msg.GiveIntegral)
}else {
this.msg.GiveIntegral=0
}
this.loading = true
this.apipost("/api/Recharge/AddOrUpdateRechargeRules",this.msg , res => {
this.loading = false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$router.go(-1);//返回上一层
} else {
this.Info(res.data.message);
}
})
} else {
return false;
}
});
}
}
}
</script>
<style scoped>
.addRechargeScheme .form-box{
padding: 20px 0;
background-color: #fff;
margin-bottom: 20px;
padding-right: 50%;
}
.addRechargeScheme .el-input__inner{
height: 32px;
line-height: 32px
}
.addRechargeScheme .inputM_l{
margin-left: 10px;
}
</style>
<template>
<div class="balanceBudget">
<div class="el-card__header">
<span>余额收支</span>
<div style="display: flex;flex-direction: row;align-items: center">
<el-button type="primary" class="el-button--small" @click="dialogVisible=true">导出全部</el-button>
</div>
</div>
<div class="content">
<div style="display: flex;flex-direction: row;align-items: center">
<div class="block">
<el-date-picker
style="padding: 3px 10px;width: 380px;height: 32px"
v-model="value"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="change"
align="right">
</el-date-picker>
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入昵称搜索"
v-model="msg.Name"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
</div>
</div>
<div style="padding: 20px;background: #fff;margin-top: 10px">
<el-table
:data="tableData"
header-cell-class-name="headClass"
style="width: 1707px;"
border
>
<el-table-column
prop="Id"
label="ID"
width="80">
</el-table-column>
<el-table-column
prop="MemberName"
label="昵称"
width="384">
</el-table-column>
<el-table-column
label="收支情况(元)"
width="180">
<template slot-scope="scope">
{{scope.row.RecordTypeStr}}{{scope.row.Balance}}
</template>
</el-table-column>
<el-table-column
prop="Description"
label="说明"
width="500">
</el-table-column>
<el-table-column
prop="Remarks"
label="备注"
width="383">
</el-table-column>
<el-table-column
prop="CreateDate"
label="充值时间"
>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="count">
</el-pagination>
</div>
<!-- 选择导出信息 -->
<el-dialog
title="选择导出信息"
:visible.sync="dialogVisible"
width="960px">
<el-form style="border: 1px solid #F0F2F7;" :model="addMsg" ref="addMsg" label-width="100px">
<div style="box-sizing: border-box;background-color: #F3F5F6;width: 100%;padding-left: 20px;height: 50px;line-height: 50px;">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
</div>
<div style="margin: 15px 0;"></div>
<div style="padding: 10px 25px 20px;">
<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
<el-checkbox style="margin-bottom:10px" v-for="city in cities" :label="city.Id" :key="city.Name">{{city.Name}}</el-checkbox>
</el-checkbox-group>
</div>
</el-form>
<div style="text-align:right;margin-top:20px">
<el-button size="small" type="primary" @click="Export">导出</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: "balanceBudget",
data(){
return{
value:'',
msg:{
pageIndex:1,
pageSize:20,
Name:'',
StartDate:'',
EndDate:'',
},
tableData:[],
count:0,
loading:false,
dialogVisible:false,
checkAll: false,
checkedCities: [],
isIndeterminate: true,
cities: [],
cityOptions: [],
addMsg:{},
}
},
created(){
this.getDateList()
this.getDown();
},
methods:{
getDateList(){
if(this.value!=''){
this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1];
}
this.loading=true;
this.apipost("/api/Recharge/GetMemberBalancePageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.tableData = res.data.data.pageData;
this.count = res.data.data.count;
}else {
this.Info(res.data.message);
}
})
},
getDown(){
this.cityOptions=[];
this.apipost("/api/Recharge/GetBalanceExportEnumList",{}, res => {
this.cities=res.data.data;
let data=res.data.data;
data.forEach(item=>{
this.cityOptions.push(item.Id)
})
})
},
Export(){
let msg = {
Name:this.msg.Name,
StartDate :this.msg.StartDate ,
EndDate :this.msg.EndDate,
ExcelEnumIds:this.checkedCities
}
msg = JSON.parse(JSON.stringify(msg));
this.JavaGetLocalFile(
"/api/Recharge/GetDistributorRemitListToExcel",
msg,
"余额收支.xls"
);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getDateList();
},
change(val){
if(val == null ){
this.value='';
this.msg.StartDate='';
this.msg.EndDate='';
}
this.getDateList();
},
handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
},
getList(){
this.getDateList();
}
}
}
</script>
<style >
.balanceBudget .el-card__header{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 18px 20px;
}
.balanceBudget .el-button--small{
padding: 9px 15px;
}
.balanceBudget .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
margin-left: 20px;
}
.balanceBudget .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.balanceBudget .content .searchInput{
line-height: normal;
display: inline-table;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
.balanceBudget .content{
background: #fff;
margin-top:10px;
padding: 15px;
box-sizing: border-box;
}
.balanceBudget .el-icon-date{
line-height: 24px;
}
.balanceBudget .el-range-separator{
line-height: 24px;
}
</style>
<template>
<div class="rechargeManage">
<div class="el-card__header">
<span>充值管理</span>
<div style="display: flex;flex-direction: row;align-items: center">
<el-button type="primary" class="el-button--small" @click="addRecharge">添加充值方案</el-button>
<el-button type="primary" class="el-button--small" @click="add">设置</el-button>
</div>
</div>
<div class="content">
<div style="display: flex;flex-direction: row;align-items: center">
<div class="block">
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入昵称搜索"
v-model="msg.Name"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
</div>
</div>
<div style="padding: 20px;background: #fff;">
<el-table
:data="tableData"
header-cell-class-name="headClass"
style="width: 1707px;"
border
>
<el-table-column
prop="ID"
label="ID"
width="100">
</el-table-column>
<el-table-column
prop="Name"
label="充值名称"
width="907">
</el-table-column>
<el-table-column
prop="Money"
label="支付金额(元)"
width="150">
</el-table-column>
<el-table-column
label="赠送信息"
width="200">
<template slot-scope="scope">
<div>赠送余额:{{scope.row.GiveMoney}}</div>
<div>赠送积分:{{scope.row.GiveIntegral}}</div>
</template>
</el-table-column>
<el-table-column
prop="CreateDate"
label="创建时间"
width="200">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top" >
<img src="../../assets/img/setup/edit.png" alt="" class="imgstyle" @click="Edit(scope.row)">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top" >
<img src="../../assets/img/setup/del.png" alt="" class="imgstyle" @click="delete_b(scope.row)">
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="count">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "rechargeManage",
data(){
return{
msg:{
pageIndex:1,
pageSize:20,
Name:'',
},
tableData:[],
count:0,
loading:false
}
},
created(){
this.getDateList();
},
methods:{
getDateList(){
this.loading=true;
this.apipost("/api/Recharge/GetRechargeRulesPage", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.tableData = res.data.data.pageData;
this.count = res.data.data.count;
}else {
this.Info(res.data.message);
}
})
},
addRecharge(){
this.$router.push('/addRechargeScheme');
},
Edit(row){
this.$router.push({
name: 'addRechargeScheme',
query: {
ID:row.ID,
blank: "y"
}
});
},
delete_b(row){
let that=this;
that.Confirm("是否删除?", function () {
that.apipost(
"/api/Recharge/DelRules",
{Id:row.ID},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getDateList();
} else {
that.Error(res.data.message);
}
},
);
});
},
add(){
},
getList(){
this.getDateList()
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getDateList();
},
}
}
</script>
<style >
.rechargeManage .el-card__header{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #fff;
padding: 18px 20px;
}
.rechargeManage .el-button--small{
padding: 9px 15px;
}
.rechargeManage .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
margin-left: 20px;
}
.rechargeManage .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.rechargeManage .content .searchInput{
line-height: normal;
display: inline-table;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
.rechargeManage .content{
background: #fff;
margin-top:10px;
padding: 15px;
box-sizing: border-box;
}
</style>
......@@ -798,14 +798,17 @@
</el-form-item>
<el-form-item label="跳转链接">
<el-row :gutter="0">
<el-col class="userinfo" :span="18" >
<el-input v-model="msg.TurnLink" :disabled="true"></el-input>
</el-col>
<el-col class="userinfo" :span="6" >
<el-button type="info" plain>选择链接</el-button>
</el-col>
</el-row>
<!--<el-row :gutter="0">-->
<!--<el-col class="userinfo" :span="18" >-->
<!--<el-input v-model="msg.TurnLink" :disabled="true"></el-input>-->
<!--</el-col>-->
<!--<el-col class="userinfo" :span="6" >-->
<!--<el-button type="info" plain>选择链接</el-button>-->
<!--</el-col>-->
<!--</el-row>-->
<el-input placeholder="请输入内容" v-model="msg.TurnLink" :disabled="true">
<el-button slot="append" @click="isShowLink=true">选择链接</el-button>
</el-input>
</el-form-item>
<el-form-item label="">
<el-tooltip class="item" effect="dark" content="建议尺寸:100 * 100" placement="top" style="margin-right: 5px">
......@@ -895,17 +898,27 @@
<el-dialog title="选择文件" :visible.sync="changeState" width="1240px">
<ChooseImg @SelectId="SelectId" ref="mychild"></ChooseImg>
</el-dialog>
<!-- 选择链接 -->
<el-dialog title="选择链接" :visible.sync="isShowLink" width="800px">
<chooseMeun ref="chooseMeun"></chooseMeun>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="isShowLink=false">取 消</el-button>
<el-button size="small" type="danger" @click="getChoiceLink()">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import ChooseImg from "@/components/global/ChooseImg.vue";
import chooseMeun from "../common/chooseMeun.vue";
export default {
name: "basicSetUp",
components: {
ChooseImg
ChooseImg,
chooseMeun
},
data() {
return {
......@@ -989,6 +1002,7 @@
ConsultWay: [],
},
isShowLink:false,
Choiceimg:0,
changeState:false,
predefineColors: [
......@@ -1142,6 +1156,13 @@
return callback();
}
},
//获取选择链接
getChoiceLink(){
//调用子组件方法
var obj = this.$refs.chooseMeun.getChooseMenu();
this.msg.TurnLink=obj.PageUrl;
this.isShowLink = false;
},
},
computed:{
......
<template>
<el-cascader
v-model="selectVal"
:options="AccList"
:props="AccListProps"
@change="handleItemChange">
</el-cascader>
</template>
<script>
export default {
name: 'demo',
data () {
return {
selectVal:[],
AccList:[],
AccListProps: {
value:'ID',
label:'Name',
children: 'children'
},
getAccListMsg:{
Id:2,
},
}
},
methods: {
handleItemChange(obj){
let obj1 = this.AccList[obj[0]],
obj2 = this.AccList[obj[0]].children[obj[1]],
obj3 = this.AccList[obj[0]].children[obj[1]].children[obj[2]];
let addMsgList = {
ID:0,
AccountId:obj3.ID,
Type:obj2.ID,
AccountType:obj1.ID,
Direct:0,
Name:obj3.Name + (obj3.BankNo?obj3.BankNo:''),
IsPublic:obj1.IsPublic,
isInCheckbox:obj3.Is_Income?true:false,
isOutCheckbox:obj3.Is_Outcome?true:false,
allName:obj3.Name + (obj3.BankNo?obj3.BankNo:''),
}
this.addMsg.list.push(addMsgList);
this.selectVal = [];
},
getAccList(){
this.apipost("/api/Destination/GetChildList",this.getAccListMsg , res => {
if(res.data.resultCode==1){
function addNum (obj) {
for (let i = 0; i < obj.length; i++) {
obj[i]['ID'] = i;
console.log(obj[i])
if (obj[i].hasOwnProperty('children')){
obj[i].children = addNum(obj[i].children)
}
}
return obj
}
this.AccList = addNum(res.data.data)
}else{
}
},null)
},
},
mounted () {
this.getAccList();
},
}
</script>
<template>
<div class="integralBudget" v-loading="loading">
<div class="el-card__header">
<span>积分收支</span>
<div style="display: flex;flex-direction: row;align-items: center">
<el-button type="primary" class="el-button--small" @click="Export">导出全部</el-button>
</div>
</div>
<div class="content">
<div style="display: flex;flex-direction: row;align-items: center">
<el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.PlatformType" size="small" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
<div class="block">
<el-date-picker
style="padding: 3px 10px;width: 380px;height: 32px"
v-model="value"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="change"
align="right">
</el-date-picker>
</div>
<el-tabs v-model="activeName" @tab-click="handleClick" style="margin-left: 20px">
<el-tab-pane label="7日" name="first"></el-tab-pane>
<el-tab-pane label="30日" name="second"></el-tab-pane>
</el-tabs>
<span style="color: #92959B;margin-left: 35px;cursor: pointer;font-size: 15px;" @click="empty">清空筛选</span>
</div>
</div>
<div style="margin: 10px 0;">
<div class="zong">
总成交
</div>
<div class="zongshow">
<div class="num-info">
<div class="num-info-item">
<div>{{Totaldata.Income!=null ?Totaldata.Income:0 }}</div>
<div class="info-item-name">积分收入</div>
</div>
<div class="num-info-item">
<div>{{Totaldata.Expend!=null ?Totaldata.Expend:0 }}</div>
<div class="info-item-name">积分支出</div>
</div>
</div>
</div>
</div>
<div style="padding: 20px;background: #fff;margin-top: 10px">
<el-table
:data="tableData"
header-cell-class-name="headClass"
style="width: 1698px;"
>
<el-table-column
prop="CreateDate"
label="日期"
width="566">
</el-table-column>
<el-table-column
prop="Income"
label="积分收入"
width="566">
</el-table-column>
<el-table-column
prop="Expend"
label="积分支出"
>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="count">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "integralBudget",
data(){
return{
msg:{
pageIndex:1,
pageSize:20,
PlatformType:0,
StartDate:'',
EndDate:'',
},
options:[],
tableData:[],
count:0,
value:'',
activeName:'',
loading:false,
Totaldata:{
Expend:0,
Income:0,
},
}
},
created(){
this.getplat();
this.getIntegraStatisticslList()
},
methods:{
getplat(){
this.apipost("/api/User/GetMemberUserSourceEnumList", {}, res => {
if(res.data.resultCode==1){
this.options = res.data.data;
this.options.unshift({Name: "全部平台", Id: 0})
}
})
},
change(val){
this.activeName=''
this.getIntegraStatisticslList()
},
getIntegraStatisticslList(){
this.loading=true;
if(this.value!=''){
this.msg.StartDate = this.value[0];
this.msg.EndDate = this.value[1];
}
this.apipost("/api/Integral/GetIntegraStatisticslList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.tableData = res.data.data.pageData;
this.count = res.data.data.count;
}else {
this.Info(res.data.message);
}
})
let Totalmsg = {
PlatformType:this.msg.PlatformType,
StartDate :this.msg.StartDate ,
EndDate :this.msg.EndDate,
}
this.apipost("/api/Integral/GetTotalIntegral", Totalmsg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.Totaldata = res.data.data;
}else {
this.Info(res.data.message);
}
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getIntegraStatisticslList();
},
Export(){
let msg = {
PlatformType:this.msg.PlatformType,
StartDate :this.msg.StartDate ,
EndDate :this.msg.EndDate,
}
msg = JSON.parse(JSON.stringify(msg));
this.JavaGetLocalFile(
"/api/Integral/GetIntegralListToExcel",
msg,
"积分收支.xls"
);
},
empty(){
this.msg.PlatformType=0;
this.msg.StartDate='';
this.msg.EndDate='';
this.value='';
this.activeName='';
},
handleClick(tab, event) {
if(tab.name=='first'){
this.fun_date(7)
}else if(tab.name=='second'){
this.fun_date(30)
}
},
fun_date(num){
let that= this
let date1 = new Date();
//今天时间
let time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate()
let date2 = new Date(date1);
date2.setDate(date1.getDate() - num);
//num是正数表示之后的时间,num负数表示之前的时间,0表示今天
let time2 = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate();
let data = []
data.push(time2)
data.push(time1)
that.value = data;
this.getIntegraStatisticslList()
},
getList(){
this.msg.pageIndex=1
this.getIntegraStatisticslList()
}
},
mounted(){
}
}
</script>
<style>
.integralBudget .el-card__header{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background: #fff;
}
.integralBudget .el-button--small{
padding: 9px 15px;
}
.integralBudget .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.integralBudget .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.integralBudget .content .searchInput{
line-height: normal;
display: inline-table;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
.integralBudget .content{
background: #fff;
margin-top:10px;
padding: 15px;
box-sizing: border-box;
}
.integralBudget .el-icon-date{
line-height: 24px;
}
.integralBudget .el-range-separator{
line-height: 24px;
}
.integralBudget .zong{
width: 100%;
height: 57px;
padding: 18px 20px;
border-bottom: 1px solid #EBEEF5;
background: white;
}
.integralBudget .zongshow{
padding: 20px;
background: white;
}
.integralBudget .num-info {
display: flex;
width: 100%;
height: 60px;
font-size: 24px;
color: #303133;
margin: 20px 0;
}
.integralBudget .num-info .num-info-item {
text-align: center;
flex-grow: 1;
}
.integralBudget .info-item-name {
font-size: 14px;
color: #92959B;
}
</style>
......@@ -3,34 +3,112 @@
<div class="el-card__header">
<span>分销排行</span>
<div style="display: flex;flex-direction: row;align-items: center">
<el-button type="primary" class="el-button--small" @click="derive">导出全部</el-button>
<el-button type="primary" class="el-button--small" @click="Export">导出全部</el-button>
</div>
</div>
<div class="content">
<div>
<el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.MemberGrade" size="small" placeholder="请选择">
<el-option label="全部平台" :value="0"></el-option>
<el-option
v-for="item in options"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入分销商名称或ID搜索"
v-model="msg.Id"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
<div class="content">
<div>
<el-select class="w100" @change="getList" style="margin-right: 10px;" v-model="msg.Source" size="small" placeholder="请选择">
<el-option label="全部平台" :value="msg.Source"></el-option>
<el-option
v-for="item in options"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入分销商名称或ID搜索"
v-model="msg.Name"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<span style="color: #92959B;margin-left: 35px;cursor: pointer;font-size: 15px;" @click="empty">清空筛选</span>
</div>
<span style="color: #92959B;margin-left: 35px;cursor: pointer;font-size: 15px;" @click="empty">清空筛选</span>
</div>
</div>
<div style="padding: 20px;background: #fff;margin-top: 10px">
<el-table
:data="tableData"
v-loading="loading"
header-cell-class-name="headClass"
style="width: 1500px;"
:default-sort = "{prop: 'date', order: 'descending'}"
>
<el-table-column
prop="Id"
label="ID"
width="120">
</el-table-column>
<el-table-column
label="分销商名称"
width="180">
<template slot-scope="scope">
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.Photo + ')',backgroundSize:'cover'}"></div>
<div flex="dir:left cross:center" style="display: flex;flex-direction: column;align-items: flex-start;justify-content: space-between">
<img v-if="scope.row.Source==1" style="width:24px;height:24px" src="../../assets/img/statistics/wechat.png" alt="" class="platform-img">
<img v-if="scope.row.Source==2" style="width:24px;height:24px" src="../../assets/img/statistics/zhifubao.png" alt="" class="platform-img">
<img v-if="scope.row.Source==3" style="width:24px;height:24px" src="../../assets/img/statistics/douyin.png" alt="" class="platform-img">
<img v-if="scope.row.Source==4" style="width:24px;height:24px" src="../../assets/img/statistics/baidu.png" alt="" class="platform-img">
<span v-if="scope.row.AliasName!=''" class="remark_name">{{scope.row.AliasName}}</span>
</div>
</template>
</el-table-column>
<el-table-column
prop="ChildrenNum"
label="直接下级数量"
sortable
width="200">
</el-table-column>
<el-table-column
prop="AllChildrenNum"
label="总下级数"
sortable
width="200">
</el-table-column>
<el-table-column
prop="AllOrderNum"
label="分销订单数量"
sortable
width="200">
</el-table-column>
<el-table-column
prop="Commission"
label="总佣金"
sortable
width="200">
</el-table-column>
<el-table-column
prop="TotalCommission"
label="累计佣金"
sortable
width="200">
</el-table-column>
<el-table-column
prop="Price"
label="已提现佣金"
sortable
>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="count">
</el-pagination>
</div>
</div>
</template>
......@@ -41,14 +119,20 @@
return{
options:[],
msg:{
value:0,
neirong:'',
Name:''
}
pageIndex:1,
pageSize:20,
Name:'',
Source:0,
},
loading:false,
count:0,
tableData: [],
}
},
created(){
this.getplat()
this.getplat();
this.getRankingListPage() //排行的列表
},
methods:{
getplat(){
......@@ -59,14 +143,50 @@
})
},
derive(){ //导出
getRankingListPage(){
this.loading=true;
this.apipost("/api/User/GetRankingListPage", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.tableData = res.data.data.pageData;
this.count = res.data.data.count;
}else {
this.Info(res.data.message);
}
})
},
formatter(row, column) {
return row.address;
},
Export(){
let msg = {
Name:this.msg.Name,
Source :this.msg.Source ,
}
msg = JSON.parse(JSON.stringify(msg));
this.JavaGetLocalFile(
"/api/User/GetRankingListToExcel",
msg,
"分销排行.xls"
);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getRankingListPage();
},
empty(){
this.msg.pageIndex=1;
this.msg.Name='';
this.msg.Source=0;
this.getRankingListPage()
},
getList(){
this.getRankingListPage()
}
},
mounted(){
......@@ -83,13 +203,6 @@
justify-content: space-between;
background: #fff;
}
.retailRanking .el-card__header2{
display: flex;
flex-direction: row;
align-items: center;
background: #fff;
padding: 18px 20px;
}
.retailRanking .el-button--small{
padding: 9px 15px;
}
......@@ -116,5 +229,23 @@
padding: 20px;
box-sizing: border-box;
}
.retailRanking .headClass{
background: rgb(243, 245, 246)!important;
color: rgb(48, 49, 51);
font-weight: 400;
padding: 6px 0px;
}
.retailRanking .app-image{
background-position: center center;
width: 50px;
height: 50px;
border-radius:0%;
float: left;
margin-right: 8px;
}
.retailRanking .remark_name {
color: #888888;
font-size: 12px;
float: right;
}
</style>
......@@ -56,7 +56,9 @@ export default {
let domainUrl = '';
domainUrl = "http://192.168.2.214:8200";
// domainUrl = "https://localhost:5001";
domainUrl = "http://192.168.2.17:8088";
domainUrl = "http://192.168.2.65";
// domainUrl = "http://192.168.2.17:8088";
let locationName = window.location.hostname;
if (locationName.indexOf('testerp.oytour') !== -1) {
domainUrl = "http://testapi.oytour.com";
......@@ -64,7 +66,7 @@ export default {
domainUrl = "http://reborn.oytour.com";
}
var obj = {
//主地址npm
//主地址npm
DomainUrl: domainUrl,
//常用提交数据URL
PostUrl: domainUrl + "/api/common/post",
......@@ -118,7 +120,7 @@ export default {
//文件类型数组
Vue.prototype.FileType = function () {
var fileTypeJson = {
//主地址npm
//主地址npm
UserImg: "User", //用户相图片
//常用提交数据URL
GoodsImg: "Goods", //素材相关文件
......@@ -189,9 +191,9 @@ export default {
var apiurl = this.domainManager().DomainUrl + cmd;
var timestamp = (new Date()).valueOf();
this.apiurl = apiurl;
if (!localStorage.mall_userInfo && localStorage.mall_userInfo != ""
if (!localStorage.mall_userInfo && localStorage.mall_userInfo != ""
&& this.$route.path.toLowerCase() != "/login"
&& this.$route.path.toLowerCase() != "/register"
&& this.$route.path.toLowerCase() != "/register"
&& this.$route.path.toLowerCase() != "/forgetpassword"
) {
this.$router.push({
......@@ -256,9 +258,12 @@ export default {
}
var token = "";
var key = "";
var MallBaseId = "0"; //小程序ID
if (this.getLocalStorage() != null) {
token = this.getLocalStorage().Token;
key = this.getLocalStorage().SecretKey;
MallBaseId = this.getLocalStorage().MallBaseId;
}
let mall_userInfo = localStorage.mall_userInfo ? JSON.parse(localStorage.mall_userInfo) : '';
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
......@@ -278,6 +283,8 @@ export default {
"sign": md5Str,
"languageId": tempLanguage,
"cmd": cmd,
"MallBaseId": MallBaseId,
}
this.$http.post(apiurl, postData, {
responseType: 'arraybuffer'
......
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