Commit 2503b839 authored by zhengke's avatar zhengke

修改

parent 8a0d882c
......@@ -3,7 +3,7 @@
<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="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> -->
</div>
......@@ -202,7 +202,7 @@
label="操作">
<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="">
</template>
</el-table-column>
......@@ -474,6 +474,7 @@ export default {
BuyGoodsNumState:true,
BuyOrderNumState:true,
hpState:0,
FxState:0
}
},
created(){
......@@ -481,9 +482,11 @@ export default {
this.getTree();
this.getRule();
this.getHpState();
this.getFxState();
this.getSupplierList()//获取供应商
},
methods:{
//获取是否开启和平返佣
getHpState(){
this.apipost("/api/user/GetHpDistributorIsEnabled", {}, res => {
if(res.data.resultCode==1){
......@@ -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){
if(!val){
if(num==1){
......
......@@ -174,7 +174,8 @@
建议零售价:¥{{ SuggestPriceInfo.MPrice }}
</span>
</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-button slot="append"></el-button>
</el-input>
......@@ -283,8 +284,8 @@
<el-option label="库存" :value="2"></el-option>
<el-option label="重量(g)" :value="3"></el-option>
<el-option label="货号" :value="4"></el-option>
<el-option label="成本价" :value="5"></el-option>
<el-option label="返佣总金额" :value="6"></el-option>
<el-option v-if="FxState==1" label="成本价" :value="5"></el-option>
<el-option v-if="FxState==1" label="返佣总金额" :value="6"></el-option>
</el-select>
<el-button @click="ggPlSet" slot="append">确定</el-button>
</el-input>
......@@ -314,12 +315,12 @@
<el-input v-model="scope.row.InventoryNum" size="small"></el-input>
</template>
</el-table-column>
<el-table-column :render-header="renderHeader" label="成本价">
<el-table-column :render-header="renderHeader" v-if="FxState==1" label="成本价">
<template slot-scope="scope">
<el-input v-model="scope.row.CostMoney" size="small"></el-input>
</template>
</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">
<el-input v-model="scope.row.Commission" size="small"></el-input>
</template>
......@@ -1127,6 +1128,7 @@
imgListIndex2: 0,
NewCategoryList: [],
hpState: 0,
FxState:0,
SuggestPriceInfo: {},
shareSettings: [],
companyCommission: 0,
......@@ -1137,6 +1139,10 @@
if (this.$route.query.hpState) {
this.hpState = this.$route.query.hpState;
}
if (this.$route.query.FxState) {
this.FxState = this.$route.query.FxState;
}
this.getTree();
this.getService();
this.getRule();
......@@ -1199,8 +1205,11 @@
}
},
HpChange() {
if (this.hpState == 1) {
this.Error("已开始和平分销,请在和平分销里面配置!");
if(this.FxState==1){
this.Error("已开启粉象分销,请在粉象分销里面配置!");
this.addMsg.SeparateDistribution = 0;
} else if(this.hpState == 1){
this.Error("已开启和平分销,请在和平分销里面配置!");
this.addMsg.SeparateDistribution = 0;
}
},
......@@ -1686,13 +1695,15 @@
this.Error('请输入商品规格第'+(i+1)+'行库存');
return
}
if(this.addMsg.SpecificationPriceList[i].CostMoney===''){
this.Error('请输入商品规格第'+(i+1)+'行成本价');
return
}
if(this.addMsg.SpecificationPriceList[i].Commission===''){
this.Error('请输入商品规格第'+(i+1)+'行返佣总金额');
return
if(this.FxState==1){
if(this.addMsg.SpecificationPriceList[i].CostMoney===''){
this.Error('请输入商品规格第'+(i+1)+'行成本价');
return
}
if(this.addMsg.SpecificationPriceList[i].Commission===''){
this.Error('请输入商品规格第'+(i+1)+'行返佣总金额');
return
}
}
}
this.apipost("/api/product/SetProductGoodsInfo", this.addMsg, res => {
......
......@@ -4,7 +4,7 @@
<span @click="goUrl" class="point">基础设置</span>
</div>
<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">
<div slot="header" class="clearfix">
<span>分销设置</span>
......@@ -40,6 +40,10 @@
<el-radio v-model="addMsg.HpReferralsGradeAudit" :label="1">开启</el-radio>
<el-radio v-model="addMsg.HpReferralsGradeAudit" :label="2">不开启</el-radio>
</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>
</el-card>
<el-card class="box-card" style="margin-top:10px">
......@@ -243,7 +247,7 @@
IndexImage: '',
IndexImagePath: '',
IsCommissionResidue: 1,
IsEnableFXGrade:1 //1开启 2不开启
},
dialogVisible: false,
......@@ -386,7 +390,6 @@
if (res.data.resultCode == 1) {
this.addMsg = res.data.data;
}
})
},
WithdrawWayEnumList() {
......
......@@ -94,17 +94,26 @@
<p @click="getReferrals(3,scope.row)" class="blue point">三级:{{scope.row.ThreeNum}}</p>
</template>
</el-table-column>
<el-table-column v-if="hpEnabled==2" prop="name" label="分销商等级" width="120">
<template slot-scope="scope">
<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="和平分销商等级">
<template slot-scope="scope">
<el-tag v-if="scope.row.HPGradeName && scope.row.HPGradeName!=''">{{scope.row.HPGradeName}}</el-tag>
</template>
</el-table-column>
<template v-if="fxEnabled==1">
<el-table-column prop="name" label="粉象分销商等级" width="110">
<template slot-scope="scope">
<el-tag v-if="scope.row.FXGradeName && scope.row.FXGradeName!=''">{{scope.row.FXGradeName}}</el-tag>
</template>
</el-table-column>
</template>
<template v-else>
<el-table-column v-if="hpEnabled==2" prop="name" label="分销商等级" width="110">
<template slot-scope="scope">
<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="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.AuditStatusName=='待审核'" type="info">{{scope.row.AuditStatusName}}</el-tag>
......@@ -139,14 +148,23 @@
src="../../assets/img/userman/nopass.png" alt="">
</el-tooltip>
<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"
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 v-if="fxEnabled==1">
<el-tooltip class="item" effect="dark" content="修改分销商等级" placement="top-start">
<img @click="openReasonNew(7,scope.row)" style="width:32px;height:32px"
src="../../assets/img/userman/edit.png" alt="">
</el-tooltip>
</template>
<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">
<img @click="openRemark(5,scope.row)" style="width:32px;height:32px"
src="../../assets/img/userman/add_remark.png" alt="">
......@@ -307,6 +325,27 @@
<el-button v-if="hpUserInfo.Status==1 || SuperiorNum==1" size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button>
</span>
</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;">{{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>
</template>
<script>
......@@ -318,6 +357,8 @@
data() {
return {
hpEnabled:2,
//是否开启粉象返佣
fxEnabled:2,
adduserDig: false,
remarkDig: false,
plDig: false,
......@@ -406,10 +447,14 @@
hpUserInfo:{},
hpGradeList:[],
SuperiorNum:0,
//粉象返佣下拉列表
GradeList:[],
fxDialog:false
};
},
created() {
this.HpEnabled();
this.FxEnabled();
this.getList();
this.getplat();
this.getDown();
......@@ -418,14 +463,20 @@
this.GetDropdownList();
this.getUserList();
this.getGrade();
this.getFXselect();
},
methods: {
openReasonNew(num,row){
this.addMsg.Type = num;
this.addMsg.UserIds = row.UserId;
this.addMsg.NewGradeId = row.HPGradeId;
this.reasonDig2 = true;
if(this.fxEnabled==1){
this.fxDialog=true;
this.addMsg.NewGradeId = row.FXGradeId;
}else{
this.reasonDig2 = true;
this.addMsg.NewGradeId = row.HPGradeId;
}
this.hpUserInfo={};
this.SuperiorNum=0;
if(row.SuperiorId==0){
......@@ -434,6 +485,14 @@
this.getbutorInfo(row)
}
},
//获取粉象返佣下拉
getFXselect(){
this.apipost("/api/user/GetFXDistributorGradeList",{GradeName:''}, res => {
if(res.data.resultCode==1){
this.GradeList=res.data.data;
}
})
},
getGrade(row){
this.apipost("/api/user/GetHpDistributorGradeList",{GradeName:'',IsGuest:2}, res => {
if(res.data.resultCode==1){
......@@ -455,6 +514,14 @@
}
})
},
//获取是否开启粉象返佣
FxEnabled(){
this.apipost("/api/user/GetIsEnableFXDistributorGrade",{}, res => {
if(res.data.resultCode==1){
this.fxEnabled=res.data.data;
}
})
},
getReferrals(type, row) {
this.referMsg.ReferralsType = type;
this.referMsg.UserId = row.UserId;
......@@ -608,6 +675,7 @@
this.reasonDig = false;
this.reasonDig2 = false;
this.remarkDig = false;
this.fxDialog=false;
this.plDig = false;
} else {
......
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