Commit 2503b839 authored by zhengke's avatar zhengke

修改

parent 8a0d882c
...@@ -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){
......
...@@ -174,7 +174,8 @@ ...@@ -174,7 +174,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>
...@@ -283,8 +284,8 @@ ...@@ -283,8 +284,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>
...@@ -314,12 +315,12 @@ ...@@ -314,12 +315,12 @@
<el-input v-model="scope.row.InventoryNum" size="small"></el-input> <el-input v-model="scope.row.InventoryNum" size="small"></el-input>
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
<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>
...@@ -1127,6 +1128,7 @@ ...@@ -1127,6 +1128,7 @@
imgListIndex2: 0, imgListIndex2: 0,
NewCategoryList: [], NewCategoryList: [],
hpState: 0, hpState: 0,
FxState:0,
SuggestPriceInfo: {}, SuggestPriceInfo: {},
shareSettings: [], shareSettings: [],
companyCommission: 0, companyCommission: 0,
...@@ -1137,6 +1139,10 @@ ...@@ -1137,6 +1139,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();
...@@ -1199,8 +1205,11 @@ ...@@ -1199,8 +1205,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;
} }
}, },
...@@ -1686,6 +1695,7 @@ ...@@ -1686,6 +1695,7 @@
this.Error('请输入商品规格第'+(i+1)+'行库存'); this.Error('请输入商品规格第'+(i+1)+'行库存');
return return
} }
if(this.FxState==1){
if(this.addMsg.SpecificationPriceList[i].CostMoney===''){ if(this.addMsg.SpecificationPriceList[i].CostMoney===''){
this.Error('请输入商品规格第'+(i+1)+'行成本价'); this.Error('请输入商品规格第'+(i+1)+'行成本价');
return return
...@@ -1695,6 +1705,7 @@ ...@@ -1695,6 +1705,7 @@
return return
} }
} }
}
this.apipost("/api/product/SetProductGoodsInfo", this.addMsg, res => { this.apipost("/api/product/SetProductGoodsInfo", this.addMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success(res.data.message); this.Success(res.data.message);
......
...@@ -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() {
......
...@@ -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">
<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"> <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=='默认等级'" type="info">{{scope.row.GradeName}}</el-tag>
<el-tag v-if="scope.row.GradeName!='默认等级' && scope.row.GradeName!=''">{{scope.row.GradeName}}</el-tag> <el-tag v-if="scope.row.GradeName!='默认等级' && scope.row.GradeName!=''">{{scope.row.GradeName}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="hpEnabled==1" prop="name" label="和平分销商等级"> <el-table-column v-if="hpEnabled==1" prop="name" label="和平分销商等级" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.HPGradeName && scope.row.HPGradeName!=''">{{scope.row.HPGradeName}}</el-tag> <el-tag v-if="scope.row.HPGradeName && scope.row.HPGradeName!=''">{{scope.row.HPGradeName}}</el-tag>
</template> </template>
</el-table-column> </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,6 +148,14 @@ ...@@ -139,6 +148,14 @@
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">
<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"> <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" <img v-if="hpEnabled==1" @click="openReasonNew(6,scope.row)" style="width:32px;height:32px"
src="../../assets/img/userman/edit.png" alt=""> src="../../assets/img/userman/edit.png" alt="">
...@@ -147,6 +164,7 @@ ...@@ -147,6 +164,7 @@
<img v-if="hpEnabled==2" @click="openReason(4,scope.row)" style="width:32px;height:32px" <img v-if="hpEnabled==2" @click="openReason(4,scope.row)" style="width:32px;height:32px"
src="../../assets/img/userman/edit.png" alt=""> src="../../assets/img/userman/edit.png" alt="">
</el-tooltip> </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,27 @@ ...@@ -307,6 +325,27 @@
<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;">{{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 +357,8 @@ ...@@ -318,6 +357,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 +447,14 @@ ...@@ -406,10 +447,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 +463,20 @@ ...@@ -418,14 +463,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.fxDialog=true;
this.addMsg.NewGradeId = row.FXGradeId;
}else{
this.reasonDig2 = true; 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 +485,14 @@ ...@@ -434,6 +485,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 +514,14 @@ ...@@ -455,6 +514,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 +675,7 @@ ...@@ -608,6 +675,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 {
......
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