Commit 2c309a0d authored by 黄媛媛's avatar 黄媛媛
parents 6b65504c eb9f177f
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="head-title"> <div class="head-title">
商品列表 商品列表
<el-button @click="Export" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">商品导出</el-button> <el-button @click="Export" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">商品导出</el-button>
<el-button @click="CommonJump('goodsListEdit',{hpState:hpState})" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">添加商品</el-button> <el-button @click="CommonJump('goodsListEdit',{hpState:hpState,FxState:FxState})" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">添加商品</el-button>
<!-- <el-button style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">更新所有商品销量</el-button> --> <!-- <el-button style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">更新所有商品销量</el-button> -->
</div> </div>
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<img @click="CommonJump('goodsListEdit',{GoodsId:scope.row.Id,hpState:hpState})" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/edit.png" alt=""> <img @click="CommonJump('goodsListEdit',{GoodsId:scope.row.Id,hpState:hpState,FxState:FxState})" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/edit.png" alt="">
<img @click="Delete(scope.row)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt=""> <img @click="Delete(scope.row)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt="">
</template> </template>
</el-table-column> </el-table-column>
...@@ -474,6 +474,7 @@ export default { ...@@ -474,6 +474,7 @@ export default {
BuyGoodsNumState:true, BuyGoodsNumState:true,
BuyOrderNumState:true, BuyOrderNumState:true,
hpState:0, hpState:0,
FxState:0
} }
}, },
created(){ created(){
...@@ -481,9 +482,11 @@ export default { ...@@ -481,9 +482,11 @@ export default {
this.getTree(); this.getTree();
this.getRule(); this.getRule();
this.getHpState(); this.getHpState();
this.getFxState();
this.getSupplierList()//获取供应商 this.getSupplierList()//获取供应商
}, },
methods:{ methods:{
//获取是否开启和平返佣
getHpState(){ getHpState(){
this.apipost("/api/user/GetHpDistributorIsEnabled", {}, res => { this.apipost("/api/user/GetHpDistributorIsEnabled", {}, res => {
if(res.data.resultCode==1){ if(res.data.resultCode==1){
...@@ -492,6 +495,16 @@ export default { ...@@ -492,6 +495,16 @@ export default {
}) })
}, },
//是否开启粉象返佣
getFxState(){
this.apipost("/api/user/GetIsEnableFXDistributorGrade", {}, res => {
if(res.data.resultCode==1){
this.FxState=res.data.data;
console.log(res,'状态');
}
})
},
goodChange(val,num){ goodChange(val,num){
if(!val){ if(!val){
if(num==1){ if(num==1){
......
...@@ -192,7 +192,8 @@ ...@@ -192,7 +192,8 @@
建议零售价:¥{{ SuggestPriceInfo.MPrice }} 建议零售价:¥{{ SuggestPriceInfo.MPrice }}
</span> </span>
</el-form-item> </el-form-item>
<el-form-item label="返佣总金额" prop="Commission"> <!-- 判断是开启了粉象返佣 -->
<el-form-item label="返佣总金额" prop="Commission" v-if="FxState==1">
<el-input v-model="addMsg.Commission" size="small" placeholder="请输入内容" class="input-with-select"> <el-input v-model="addMsg.Commission" size="small" placeholder="请输入内容" class="input-with-select">
<el-button slot="append"></el-button> <el-button slot="append"></el-button>
</el-input> </el-input>
...@@ -301,8 +302,8 @@ ...@@ -301,8 +302,8 @@
<el-option label="库存" :value="2"></el-option> <el-option label="库存" :value="2"></el-option>
<el-option label="重量(g)" :value="3"></el-option> <el-option label="重量(g)" :value="3"></el-option>
<el-option label="货号" :value="4"></el-option> <el-option label="货号" :value="4"></el-option>
<el-option label="成本价" :value="5"></el-option> <el-option v-if="FxState==1" label="成本价" :value="5"></el-option>
<el-option label="返佣总金额" :value="6"></el-option> <el-option v-if="FxState==1" label="返佣总金额" :value="6"></el-option>
</el-select> </el-select>
<el-button @click="ggPlSet" slot="append">确定</el-button> <el-button @click="ggPlSet" slot="append">确定</el-button>
</el-input> </el-input>
...@@ -337,7 +338,7 @@ ...@@ -337,7 +338,7 @@
<el-input v-model="scope.row.CostMoney" size="small"></el-input> <el-input v-model="scope.row.CostMoney" size="small"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :render-header="renderHeader" width="120" label="返佣总金额"> <el-table-column :render-header="renderHeader" v-if="FxState==1" width="120" label="返佣总金额">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.Commission" size="small"></el-input> <el-input v-model="scope.row.Commission" size="small"></el-input>
</template> </template>
...@@ -1147,6 +1148,7 @@ ...@@ -1147,6 +1148,7 @@
imgListIndex2: 0, imgListIndex2: 0,
NewCategoryList: [], NewCategoryList: [],
hpState: 0, hpState: 0,
FxState:0,
SuggestPriceInfo: {}, SuggestPriceInfo: {},
shareSettings: [], shareSettings: [],
companyCommission: 0, companyCommission: 0,
...@@ -1157,6 +1159,10 @@ ...@@ -1157,6 +1159,10 @@
if (this.$route.query.hpState) { if (this.$route.query.hpState) {
this.hpState = this.$route.query.hpState; this.hpState = this.$route.query.hpState;
} }
if (this.$route.query.FxState) {
this.FxState = this.$route.query.FxState;
}
this.getTree(); this.getTree();
this.getService(); this.getService();
this.getRule(); this.getRule();
...@@ -1219,8 +1225,11 @@ ...@@ -1219,8 +1225,11 @@
} }
}, },
HpChange() { HpChange() {
if (this.hpState == 1) { if(this.FxState==1){
this.Error("已开始和平分销,请在和平分销里面配置!"); this.Error("已开启粉象分销,请在粉象分销里面配置!");
this.addMsg.SeparateDistribution = 0;
} else if(this.hpState == 1){
this.Error("已开启和平分销,请在和平分销里面配置!");
this.addMsg.SeparateDistribution = 0; this.addMsg.SeparateDistribution = 0;
} }
}, },
...@@ -1710,9 +1719,11 @@ ...@@ -1710,9 +1719,11 @@
this.Error('请输入商品规格第'+(i+1)+'行成本价'); this.Error('请输入商品规格第'+(i+1)+'行成本价');
return return
} }
if(this.addMsg.SpecificationPriceList[i].Commission===''){ if(this.FxState==1){
this.Error('请输入商品规格第'+(i+1)+'行返佣总金额'); if(this.addMsg.SpecificationPriceList[i].Commission===''){
return this.Error('请输入商品规格第'+(i+1)+'行返佣总金额');
return
}
} }
} }
this.apipost("/api/product/SetProductGoodsInfo", this.addMsg, res => { this.apipost("/api/product/SetProductGoodsInfo", this.addMsg, res => {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<span @click="goUrl" class="point">基础设置</span> <span @click="goUrl" class="point">基础设置</span>
</div> </div>
<div class="content"> <div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="160px">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>分销设置</span> <span>分销设置</span>
...@@ -40,6 +40,10 @@ ...@@ -40,6 +40,10 @@
<el-radio v-model="addMsg.HpReferralsGradeAudit" :label="1">开启</el-radio> <el-radio v-model="addMsg.HpReferralsGradeAudit" :label="1">开启</el-radio>
<el-radio v-model="addMsg.HpReferralsGradeAudit" :label="2">不开启</el-radio> <el-radio v-model="addMsg.HpReferralsGradeAudit" :label="2">不开启</el-radio>
</el-form-item> </el-form-item>
<el-form-item label="是否启用粉象返佣模式">
<el-radio v-model="addMsg.IsEnableFXGrade" :label="1">开启</el-radio>
<el-radio v-model="addMsg.IsEnableFXGrade" :label="2">不开启</el-radio>
</el-form-item>
</div> </div>
</el-card> </el-card>
<el-card class="box-card" style="margin-top:10px"> <el-card class="box-card" style="margin-top:10px">
...@@ -243,7 +247,7 @@ ...@@ -243,7 +247,7 @@
IndexImage: '', IndexImage: '',
IndexImagePath: '', IndexImagePath: '',
IsCommissionResidue: 1, IsCommissionResidue: 1,
IsEnableFXGrade:1 //1开启 2不开启
}, },
dialogVisible: false, dialogVisible: false,
...@@ -386,7 +390,6 @@ ...@@ -386,7 +390,6 @@
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addMsg = res.data.data; this.addMsg = res.data.data;
} }
}) })
}, },
WithdrawWayEnumList() { WithdrawWayEnumList() {
......
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
<div class="orderList distributionOrder"> <div class="orderList distributionOrder">
<div class="head-title"> <div class="head-title">
订单列表 订单列表
<el-button @click="dialogVisible=true" style="float:right;margin-top: -5px;" size="small" type="primary">批量导出</el-button> <div style="float:right;">
<el-button @click="getExport(1)" style="margin: -5px 0 0 20px;" size="small" type="primary">批量导出</el-button>
<el-button @click="getExport(2)" style="margin-top: -5px;" size="small" type="primary">粉象导出</el-button>
</div>
</div> </div>
<div class="content"> <div class="content">
<div> <div>
...@@ -156,15 +159,30 @@ ...@@ -156,15 +159,30 @@
</div> </div>
<div flex="main:center cross:center" class="app-order-info" style="border-right: 0px; width: 20%;"> <div flex="main:center cross:center" class="app-order-info" style="border-right: 0px; width: 20%;">
<div style="margin:0 auto;width:90%;margin-left:17%"> <div style="margin:0 auto;width:90%;margin-left:17%">
<div v-for="(list,index2) in item.OrderCommissionList" :key="index2" style="margin: 10px;text-align:left"> <template v-if="item.isShow">
<div> <div v-for="(list,index2) in item.OrderCommissionList" v-if="index2<3" :key="index2" style="margin: 10px;text-align:left">
<span>{{list.GradeDescription}}</span> <div>
<span class="price">{{list.Commission}}</span> <span>{{list.GradeDescription}}</span>
<span class="price">{{list.Commission}}</span>
</div>
<div>昵称:{{list.UserName}}</div>
<div v-if="list.Name!=''">姓名:{{list.Name}}</div>
<div v-if="getPanduan(list.Mobile)">手机:{{list.Mobile}}</div>
</div> </div>
<div>昵称:{{list.UserName}}</div> <span v-if="item.OrderCommissionList.length>3" @click="showMoreDis(item)" class="distri_more">查看更多↓</span>
<div>姓名:{{list.Name}}</div> </template>
<div>手机:{{list.Mobile}}</div> <template v-else>
</div> <div v-for="(list,index2) in item.OrderCommissionList" :key="index2" style="margin: 10px;text-align:left">
<div>
<span>{{list.GradeDescription}}</span>
<span class="price">{{list.Commission}}</span>
</div>
<div>昵称:{{list.UserName}}</div>
<div v-if="list.Name!=''">姓名:{{list.Name}}</div>
<div v-if="getPanduan(list.Mobile)">手机:{{list.Mobile}}</div>
</div>
<span v-if="item.OrderCommissionList.length>3" @click="hideMoreDis(item)" class="distri_more">点击收起↑</span>
</template>
</div> </div>
</div> </div>
</div> </div>
...@@ -200,7 +218,7 @@ ...@@ -200,7 +218,7 @@
width="960px"> width="960px">
<el-form style="border: 1px solid #F0F2F7;" :model="addMsg" ref="addMsg" label-width="100px"> <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;"> <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> <el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
</div> </div>
<div style="margin: 15px 0;"></div> <div style="margin: 15px 0;"></div>
<div style="padding: 10px 25px 20px;"> <div style="padding: 10px 25px 20px;">
...@@ -211,7 +229,8 @@ ...@@ -211,7 +229,8 @@
</el-form> </el-form>
<div style="text-align:right;margin-top:20px"> <div style="text-align:right;margin-top:20px">
<el-button size="small" type="primary" @click="Export">导出</el-button> <el-button size="small" v-if="commonNum==1" type="primary" @click="Export">导出</el-button>
<el-button size="small" v-if="commonNum==2" type="primary" @click="ExportFX">导出</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -227,7 +246,6 @@ export default { ...@@ -227,7 +246,6 @@ export default {
checkedCities: [], checkedCities: [],
cities: [], cities: [],
cityOptions: [], cityOptions: [],
isIndeterminate: true,
addMsg:{}, addMsg:{},
dialogVisible:false, dialogVisible:false,
...@@ -274,18 +292,18 @@ export default { ...@@ -274,18 +292,18 @@ export default {
moresendtips:'', moresendtips:'',
hszDig:false, hszDig:false,
hszMsg:{}, hszMsg:{},
commonNum:0
} }
}, },
created(){ created(){
if (this.$route.query.UserId) {//如果有UserId过来 查询显示用户id if (this.$route.query.UserId) {//如果有UserId过来 查询显示用户id
console.log(this.$route.query.UserId)
this.msg.UserId = this.$route.query.UserId; this.msg.UserId = this.$route.query.UserId;
this.msgId = 3; this.msgId = 3;
this.msgVal = this.msg.UserId this.msgVal = this.msg.UserId
} }
this.getList(); this.getList();
this.getplat(); this.getplat();
this.getDown(); // this.getDown();
this.getOrderStatus(); this.getOrderStatus();
this.getDelivery(); this.getDelivery();
this.getOrderType(); this.getOrderType();
...@@ -330,7 +348,16 @@ export default { ...@@ -330,7 +348,16 @@ export default {
this.msg.DistributionUserId = msgVal this.msg.DistributionUserId = msgVal
} }
}, },
//点击批量导出或粉象导出
getExport(num){
this.dialogVisible=true;
this.commonNum=num;
if(num==1){
this.getDown();
}else{
this.getFxList();
}
},
Export(){ Export(){
this.msg.ExcelEnumIds=this.checkedCities; this.msg.ExcelEnumIds=this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg)); let msg = JSON.parse(JSON.stringify(this.msg));
...@@ -351,14 +378,44 @@ export default { ...@@ -351,14 +378,44 @@ export default {
}) })
}, },
//粉象弹窗数据
getFxList(){
this.cityOptions=[];
this.apipost("/api/order/GetDistributionOrdersExportEnumListForFX",{}, res => {
this.cities=res.data.data;
let data=res.data.data;
data.forEach(item=>{
this.cityOptions.push(item.Id)
})
})
},
//导出粉象
ExportFX(){
this.msg.ExcelEnumIds=this.checkedCities;
let msg = JSON.parse(JSON.stringify(this.msg));
this.GetLocalFile(
"/api/order/GetDistributionOrdersToExcelForFX",
msg,
"分销订单列表.xls"
);
},
//显示更多
showMoreDis(item){
item.isShow=false;
this.$forceUpdate();
},
//点击收起
hideMoreDis(item){
item.isShow=true;
this.$forceUpdate();
},
handleCheckAllChange(val) { handleCheckAllChange(val) {
this.checkedCities = val ? this.cityOptions : []; this.checkedCities = val ? this.cityOptions : [];
this.isIndeterminate = false;
}, },
handleCheckedCitiesChange(value) { handleCheckedCitiesChange(value) {
let checkedCount = value.length; let checkedCount = value.length;
this.checkAll = checkedCount === this.cities.length; this.checkAll = checkedCount === this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
}, },
handleClick(val){ handleClick(val){
let dataId=val.$attrs.dataId; let dataId=val.$attrs.dataId;
...@@ -367,6 +424,15 @@ export default { ...@@ -367,6 +424,15 @@ export default {
this.getList(); this.getList();
}, },
//判断字段是否全为空格
getPanduan(val){
if(val.trim().length === 0){
return false;
}else{
return true;
}
},
getList(){ getList(){
this.ChangeId(this.msgId); this.ChangeId(this.msgId);
if(!this.msgVal || this.msgVal==''){ if(!this.msgVal || this.msgVal==''){
...@@ -390,6 +456,11 @@ export default { ...@@ -390,6 +456,11 @@ export default {
this.total=res.data.data.count; this.total=res.data.data.count;
let pageData=res.data.data.pageData; let pageData=res.data.data.pageData;
this.tableData=pageData; this.tableData=pageData;
if(this.tableData){
this.tableData.forEach(x=>{
x.isShow=true;
})
}
} }
}) })
...@@ -600,5 +671,10 @@ export default { ...@@ -600,5 +671,10 @@ export default {
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.distri_more{
color:#409EFF;
margin-bottom:20px;
cursor: pointer;
display:block;
}
</style> </style>
...@@ -94,17 +94,26 @@ ...@@ -94,17 +94,26 @@
<p @click="getReferrals(3,scope.row)" class="blue point">三级:{{scope.row.ThreeNum}}</p> <p @click="getReferrals(3,scope.row)" class="blue point">三级:{{scope.row.ThreeNum}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="hpEnabled==2" prop="name" label="分销商等级" width="120"> <template v-if="fxEnabled==1">
<template slot-scope="scope"> <el-table-column prop="name" label="粉象分销商等级" width="110">
<el-tag v-if="scope.row.GradeName=='默认等级'" type="info">{{scope.row.GradeName}}</el-tag> <template slot-scope="scope">
<el-tag v-if="scope.row.GradeName!='默认等级' && scope.row.GradeName!=''">{{scope.row.GradeName}}</el-tag> <el-tag v-if="scope.row.FXGradeName && scope.row.FXGradeName!=''">{{scope.row.FXGradeName}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="hpEnabled==1" prop="name" label="和平分销商等级"> </template>
<template slot-scope="scope"> <template v-else>
<el-tag v-if="scope.row.HPGradeName && scope.row.HPGradeName!=''">{{scope.row.HPGradeName}}</el-tag> <el-table-column v-if="hpEnabled==2" prop="name" label="分销商等级" width="110">
</template> <template slot-scope="scope">
</el-table-column> <el-tag v-if="scope.row.GradeName=='默认等级'" type="info">{{scope.row.GradeName}}</el-tag>
<el-tag v-if="scope.row.GradeName!='默认等级' && scope.row.GradeName!=''">{{scope.row.GradeName}}</el-tag>
</template>
</el-table-column>
<el-table-column v-if="hpEnabled==1" prop="name" label="和平分销商等级" width="110">
<template slot-scope="scope">
<el-tag v-if="scope.row.HPGradeName && scope.row.HPGradeName!=''">{{scope.row.HPGradeName}}</el-tag>
</template>
</el-table-column>
</template>
<el-table-column prop="name" label="状态"> <el-table-column prop="name" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.AuditStatusName=='待审核'" type="info">{{scope.row.AuditStatusName}}</el-tag> <el-tag v-if="scope.row.AuditStatusName=='待审核'" type="info">{{scope.row.AuditStatusName}}</el-tag>
...@@ -139,14 +148,23 @@ ...@@ -139,14 +148,23 @@
src="../../assets/img/userman/nopass.png" alt=""> src="../../assets/img/userman/nopass.png" alt="">
</el-tooltip> </el-tooltip>
<template v-if="scope.row.AuditStatus!=1 && scope.row.AuditStatus!=3"> <template v-if="scope.row.AuditStatus!=1 && scope.row.AuditStatus!=3">
<el-tooltip class="item" effect="dark" content="修改分销商等级" placement="top-start">
<img v-if="hpEnabled==1" @click="openReasonNew(6,scope.row)" style="width:32px;height:32px" <template v-if="fxEnabled==1">
src="../../assets/img/userman/edit.png" alt=""> <el-tooltip class="item" effect="dark" content="修改分销商等级" placement="top-start">
</el-tooltip> <img @click="openReasonNew(7,scope.row)" style="width:32px;height:32px"
<el-tooltip class="item" effect="dark" content="修改分销商等级" placement="top-start"> src="../../assets/img/userman/edit.png" alt="">
<img v-if="hpEnabled==2" @click="openReason(4,scope.row)" style="width:32px;height:32px" </el-tooltip>
src="../../assets/img/userman/edit.png" alt=""> </template>
</el-tooltip> <template v-else>
<el-tooltip class="item" effect="dark" content="修改分销商等级" placement="top-start">
<img v-if="hpEnabled==1" @click="openReasonNew(6,scope.row)" style="width:32px;height:32px"
src="../../assets/img/userman/edit.png" alt="">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="修改分销商等级" placement="top-start">
<img v-if="hpEnabled==2" @click="openReason(4,scope.row)" style="width:32px;height:32px"
src="../../assets/img/userman/edit.png" alt="">
</el-tooltip>
</template>
<el-tooltip class="item" effect="dark" content="添加备注" placement="top-start"> <el-tooltip class="item" effect="dark" content="添加备注" placement="top-start">
<img @click="openRemark(5,scope.row)" style="width:32px;height:32px" <img @click="openRemark(5,scope.row)" style="width:32px;height:32px"
src="../../assets/img/userman/add_remark.png" alt=""> src="../../assets/img/userman/add_remark.png" alt="">
...@@ -307,6 +325,28 @@ ...@@ -307,6 +325,28 @@
<el-button v-if="hpUserInfo.Status==1 || SuperiorNum==1" size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button> <el-button v-if="hpUserInfo.Status==1 || SuperiorNum==1" size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 粉象返佣提示框 -->
<el-dialog title="提示" :visible.sync="fxDialog" width="500px">
<p v-if="hpUserInfo.Status==1" style="margin-left: 59px;">上级
<span style="margin-left: 9px;" v-if="fxEnabled==1">{{hpUserInfo.UserName}}({{hpUserInfo.FXGradeName}})</span>
<span style="margin-left: 9px;" v-else>{{hpUserInfo.UserName}}({{hpUserInfo.HPGradeName}})</span>
</p>
<p class="cred" v-if="hpUserInfo.Status==2">需上级用户先分配分销等级</p>
<p class="cred" v-if="hpUserInfo.Status==3">需上级用户先成为分销商</p>
<el-form style="margin-top:10px" v-if="hpUserInfo.Status==1 || SuperiorNum==1" :model="addMsg" :rules="rules" ref="addMsg" label-width="0">
<el-form-item label-width="100px" label="分销商等级">
<el-select class="w200" v-model="addMsg.NewGradeId" size="small" placeholder="请选择">
<el-option v-for="item in GradeList" :key="item.Id" :label="item.GradeName" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="fxDialog = false">取 消</el-button>
<el-button v-if="hpUserInfo.Status==1 || SuperiorNum==1" size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -318,6 +358,8 @@ ...@@ -318,6 +358,8 @@
data() { data() {
return { return {
hpEnabled:2, hpEnabled:2,
//是否开启粉象返佣
fxEnabled:2,
adduserDig: false, adduserDig: false,
remarkDig: false, remarkDig: false,
plDig: false, plDig: false,
...@@ -406,10 +448,14 @@ ...@@ -406,10 +448,14 @@
hpUserInfo:{}, hpUserInfo:{},
hpGradeList:[], hpGradeList:[],
SuperiorNum:0, SuperiorNum:0,
//粉象返佣下拉列表
GradeList:[],
fxDialog:false
}; };
}, },
created() { created() {
this.HpEnabled(); this.HpEnabled();
this.FxEnabled();
this.getList(); this.getList();
this.getplat(); this.getplat();
this.getDown(); this.getDown();
...@@ -418,14 +464,20 @@ ...@@ -418,14 +464,20 @@
this.GetDropdownList(); this.GetDropdownList();
this.getUserList(); this.getUserList();
this.getGrade(); this.getGrade();
this.getFXselect();
}, },
methods: { methods: {
openReasonNew(num,row){ openReasonNew(num,row){
this.addMsg.Type = num; this.addMsg.Type = num;
this.addMsg.UserIds = row.UserId; this.addMsg.UserIds = row.UserId;
this.addMsg.NewGradeId = row.HPGradeId; if(this.fxEnabled==1){
this.reasonDig2 = true; this.fxDialog=true;
this.addMsg.NewGradeId = row.FXGradeId;
}else{
this.reasonDig2 = true;
this.addMsg.NewGradeId = row.HPGradeId;
}
this.hpUserInfo={}; this.hpUserInfo={};
this.SuperiorNum=0; this.SuperiorNum=0;
if(row.SuperiorId==0){ if(row.SuperiorId==0){
...@@ -434,6 +486,14 @@ ...@@ -434,6 +486,14 @@
this.getbutorInfo(row) this.getbutorInfo(row)
} }
}, },
//获取粉象返佣下拉
getFXselect(){
this.apipost("/api/user/GetFXDistributorGradeList",{GradeName:''}, res => {
if(res.data.resultCode==1){
this.GradeList=res.data.data;
}
})
},
getGrade(row){ getGrade(row){
this.apipost("/api/user/GetHpDistributorGradeList",{GradeName:'',IsGuest:2}, res => { this.apipost("/api/user/GetHpDistributorGradeList",{GradeName:'',IsGuest:2}, res => {
if(res.data.resultCode==1){ if(res.data.resultCode==1){
...@@ -455,6 +515,14 @@ ...@@ -455,6 +515,14 @@
} }
}) })
}, },
//获取是否开启粉象返佣
FxEnabled(){
this.apipost("/api/user/GetIsEnableFXDistributorGrade",{}, res => {
if(res.data.resultCode==1){
this.fxEnabled=res.data.data;
}
})
},
getReferrals(type, row) { getReferrals(type, row) {
this.referMsg.ReferralsType = type; this.referMsg.ReferralsType = type;
this.referMsg.UserId = row.UserId; this.referMsg.UserId = row.UserId;
...@@ -608,6 +676,7 @@ ...@@ -608,6 +676,7 @@
this.reasonDig = false; this.reasonDig = false;
this.reasonDig2 = false; this.reasonDig2 = false;
this.remarkDig = false; this.remarkDig = false;
this.fxDialog=false;
this.plDig = false; this.plDig = false;
} else { } else {
......
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="GradeName" label="等级名称"> <el-table-column prop="GradeName" label="等级名称">
</el-table-column> </el-table-column>
<el-table-column prop="IsGuest" label="是否普通会员"> <el-table-column prop="IsGuest" label="会员类型"">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.IsGuest==1">普通会员</span> <span v-if="scope.row.IsGuest==1">普通</span>
<span v-if="scope.row.IsGuest==2">其他会员</span> <span v-if="scope.row.IsGuest==2">其他</span>
<span v-if="scope.row.IsGuest==3">Vip</span> <span v-if="scope.row.IsGuest==3">Vip</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -50,14 +50,14 @@ ...@@ -50,14 +50,14 @@
<span>{{scope.row.IsCanBuy==1?'是':'否'}}</span> <span>{{scope.row.IsCanBuy==1?'是':'否'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="BuyMoney" label="购买金额">
</el-table-column>
<el-table-column prop="DecimalType" label="小数类型"> <el-table-column prop="DecimalType" label="小数类型">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.DecimalType==1">取整</span> <span v-if="scope.row.DecimalType==1">取整</span>
<span v-if="scope.row.DecimalType==2">保留两位小数</span> <span v-if="scope.row.DecimalType==2">保留两位小数</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="BuyMoney" label="购买金额">
</el-table-column>
<el-table-column prop="UpdateDate" label="操作时间"> <el-table-column prop="UpdateDate" label="操作时间">
</el-table-column> </el-table-column>
<el-table-column prop="address" width="120" label="操作"> <el-table-column prop="address" width="120" label="操作">
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<p style="padding-left:34px;margin-bottom:15px" class="cred">注:等级需连续,从等级1开始</p> <p style="padding-left:34px;margin-bottom:15px" class="cred">注:等级需连续,从等级1开始</p>
<el-form-item label="分销商等级选择" prop="Grade"> <el-form-item label="分销商等级" prop="Grade">
<el-select v-model="addMsg.Grade" placeholder="请选择"> <el-select v-model="addMsg.Grade" placeholder="请选择">
<el-option v-for="(item,index) in numList" :key="index" :label="`等级${index+1}`" :value="item.Id" <el-option v-for="(item,index) in numList" :key="index" :label="`等级${index+1}`" :value="item.Id"
:disabled="item.dis"> :disabled="item.dis">
...@@ -93,17 +93,17 @@ ...@@ -93,17 +93,17 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<p style="padding-left:34px;margin-bottom:15px;visibility:hidden;" class="cred">.</p> <p style="padding-left:34px;margin-bottom:15px;visibility:hidden;" class="cred">.</p>
<el-form-item label="分销商等级名称" prop="GradeName"> <el-form-item label="等级名称" prop="GradeName">
<el-input v-model="addMsg.GradeName" style="width:218px;"></el-input> <el-input v-model="addMsg.GradeName" style="width:218px;"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否普通会员" prop="IsGuest"> <el-form-item label="会员类型" prop="IsGuest">
<el-select v-model="addMsg.IsGuest" placeholder="请选择"> <el-select v-model="addMsg.IsGuest" placeholder="请选择">
<el-option label="普通会员" :value="1"></el-option> <el-option label="普通" :value="1"></el-option>
<el-option label="其他会员" :value="2"></el-option> <el-option label="其他" :value="2"></el-option>
<el-option label="Vip" :value="3"></el-option> <el-option label="Vip" :value="3"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
Id: 0, //等级id Id: 0, //等级id
Grade: 1, //等级 Grade: 1, //等级
GradeName: '', //等级名称 GradeName: '', //等级名称
IsGuest: 1, //是否普通会员 1普通会员 2其他会员 3Vip IsGuest: 2, //是否普通会员 1普通会员 2其他会员 3Vip
CommissionRatio: 0, //返佣比例 CommissionRatio: 0, //返佣比例
SiblingRatio: 0, //同级返佣比例 SiblingRatio: 0, //同级返佣比例
SiblingRebatesNum: 0, //可拿同级返佣的数量 SiblingRebatesNum: 0, //可拿同级返佣的数量
...@@ -306,13 +306,13 @@ ...@@ -306,13 +306,13 @@
Id: 0, Id: 0,
Grade: 1, Grade: 1,
GradeName: '', GradeName: '',
IsGuest: 1, IsGuest: 2,
CommissionRatio: 0, //返佣比例 CommissionRatio: 0, //返佣比例
SiblingRatio: 0, //同级返佣比例 SiblingRatio: 0, //同级返佣比例
SiblingRebatesNum: 0, //可拿同级返佣的数量 SiblingRebatesNum: 0, //可拿同级返佣的数量
IsCanBuy: 1, //是否可以购买 1是 2否 IsCanBuy: 2, //是否可以购买 1是 2否
BuyMoney: 0, //购买金额 BuyMoney: 0, //购买金额
IsUpgrade: 1, //是否可以升级 1是 2否 IsUpgrade: 2, //是否可以升级 1是 2否
UpgradeNum: 0, //升级所需下级等级数量 UpgradeNum: 0, //升级所需下级等级数量
UpgradeId: 1, //升序所需下级等级id UpgradeId: 1, //升序所需下级等级id
DecimalType:1 //小数类型 DecimalType:1 //小数类型
......
...@@ -179,9 +179,7 @@ ...@@ -179,9 +179,7 @@
<h3>分销信息</h3> <h3>分销信息</h3>
<div v-for="(item,index) in dataInfo.DistributionInfo" :key="index"> <div v-for="(item,index) in dataInfo.DistributionInfo" :key="index">
<div class="share-title"> <div class="share-title">
<span v-if="item.Grade==0">自购返佣</span> <span>{{item.GradeDescription}}</span>
<span v-if="item.Grade==1">一级分销商</span>
<span v-if="item.Grade==2">二级分销商</span>
</div> </div>
<div flex="dir:left cross:center" class="item-box"> <div flex="dir:left cross:center" class="item-box">
<span class="label">姓名:</span> <span class="label">姓名:</span>
......
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