Commit e085853c authored by 黄奎's avatar 黄奎
parents 8b4e54b6 04b07c0b
......@@ -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')" 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 style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">更新所有商品销量</el-button> -->
</div>
......@@ -177,7 +177,7 @@
width="200"
label="操作">
<template slot-scope="scope">
<img @click="CommonJump('goodsListEdit',{GoodsId:scope.row.Id})" 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})" 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>
......@@ -434,14 +434,24 @@ export default {
keepGoodsIds:'',
BuyGoodsNumState:true,
BuyOrderNumState:true,
hpState:0,
}
},
created(){
this.getList();
this.getTree();
this.getRule();
this.getHpState();
},
methods:{
getHpState(){
this.apipost("/api/user/GetHpDistributorIsEnabled", {}, res => {
if(res.data.resultCode==1){
this.hpState=res.data.data;
}
})
},
goodChange(val,num){
if(!val){
if(num==1){
......
......@@ -147,10 +147,13 @@
</el-input>
</el-form-item>
<el-form-item label="成本价">
<el-input v-model="addMsg.CostPrice" type="number" min="1" size="small" placeholder="请输入内容"
<el-input @change="getSuggestPrice" v-model="addMsg.CostPrice" type="number" min="1" size="small" placeholder="请输入内容"
class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
<span v-if="SuggestPriceInfo.Status && SuggestPriceInfo.Status==1" class="cred" style="position: absolute;width: 400px;margin-left: 15px;">
建议零售价:¥{{SuggestPriceInfo.MPrice}}
</span>
</el-form-item>
<el-form-item label="商品面议">
<el-tooltip class="item" effect="dark" content="如果开启面议,则商品无法在线支付" placement="top-start"
......@@ -735,7 +738,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="flDig=false,addMsg.CategoryList=keepCategoryList,ExitCateList()">取 消</el-button>
<el-button @click="flDig = false" size="small" type="primary">确 定</el-button>
<el-button @click="flDig = false,getSuggestPrice()" size="small" type="primary">确 定</el-button>
</span>
</el-dialog>
<!-- 查看图例 -->
......@@ -1013,11 +1016,15 @@
imgListIndex1:0,
imgListIndex2:0,
NewCategoryList:[],
hpState:0,
SuggestPriceInfo:{},
};
},
created() {
if (this.$route.query.hpState) {
this.hpState = this.$route.query.hpState;
}
},
mounted() {
this.$refs.ue.loadUe();
......@@ -1034,6 +1041,7 @@
},
methods: {
//
HySet(){
this.memberList2.forEach(item=>{
this.memberCheck.forEach(check=>{
......@@ -1571,6 +1579,7 @@
}
})
this.ExitCateList();
this.getSuggestPrice();
},
getTree() {
let msg1 = {
......@@ -1603,6 +1612,7 @@
GoodsId: this.GoodsId
}, res => {
this.addMsg = res.data.data;
console.log("this.addMsg",this.addMsg)
this.SpecificationPriceList = this.addMsg.SpecificationPriceList;
this.SpecificationList = this.addMsg.SpecificationList;
if (this.addMsg.SeparateDistributionType == 1) {
......@@ -1628,9 +1638,31 @@
item.Name=item.CategoryName;
this.NewCategoryList.push(item.CategoryId)
})
this.getSuggestPrice()
})
},
getSuggestPrice(){
if(this.hpState==1 && Number(this.addMsg.CostPrice)>0){
let arr=[];
this.addMsg.CategoryList.forEach(item=>{
item.Name=item.CategoryName;
arr.push(item.CategoryId)
})
let CategoryIds=arr.join(',');
let msg={
CategoryIds:CategoryIds,
CostPrice:this.addMsg.CostPrice
}
this.apipost("/api/user/GetHpGoodsSuggestPrice", msg, res => {
if (res.data.resultCode == 1) {
this.SuggestPriceInfo = res.data.data;
console.log("this.SuggestPriceInfo",this.SuggestPriceInfo)
}
})
}
},
getRule() {
let msg1 = {
pageIndex: 1,
......
......@@ -76,7 +76,7 @@
label="返佣(名称/比例)">
<template slot-scope="scope">
<p v-for="(item,index) in scope.row.RatioList" :key="index" type="success" style="margin-right:6px">
{{item.GradeName}}:{{item.CommissionRatio}}
{{item.GradeName}}{{item.CommissionRatio}}%
</p>
</template>
</el-table-column>
......
......@@ -155,10 +155,7 @@
<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">
<div>
<span v-if="list.Grade==0">自购返利</span>
<span v-if="list.Grade==1">一级佣金</span>
<span v-if="list.Grade==2">二级佣金</span>
<span v-if="list.Grade==3">三级佣金</span>
<span>{{list.GradeDescription}}</span>
<span class="price">{{list.Commission}}</span>
</div>
<div>昵称:{{list.Name}}</div>
......
......@@ -102,7 +102,7 @@
</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!=''" type="info">{{scope.row.HPGradeName}}</el-tag>
<el-tag v-if="scope.row.HPGradeName && scope.row.HPGradeName!=''">{{scope.row.HPGradeName}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="name" label="状态">
......@@ -191,24 +191,7 @@
</el-dialog>
<!-- 审批同意或拒绝单个修改等级 -->
<el-dialog title="提示" :visible.sync="reasonDig" width="500px">
<template v-if="hpEnabled==1">
<p v-if="hpUserInfo.Status==1">{{hpUserInfo.UserName}}({{hpUserInfo.HPGradeName}})</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 hpGradeList" :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="reasonDig = false">取 消</el-button>
<el-button v-if="hpUserInfo.Status==1 || SuperiorNum==1" size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button>
</span>
</template>
<template v-if="hpEnabled==2">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="0">
<template v-if="addMsg.Type==1 || addMsg.Type==2">
<p style="margin-bottom:10px">请输入原因</p>
......@@ -229,7 +212,6 @@
<el-button size="small" @click="reasonDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="czsubmitForm('addMsg')">确 定</el-button>
</span>
</template>
</el-dialog>
<!-- 批量修改 -->
<el-dialog custom-class="plxg" title="批量修改" :visible.sync="plDig" width="960px">
......@@ -305,6 +287,26 @@
<el-button size="small" type="primary" @click="referDig=false">确定</el-button>
</div>
</el-dialog>
<!-- 审批同意或拒绝单个修改等级 -->
<el-dialog title="提示" :visible.sync="reasonDig2" 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 hpGradeList" :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="reasonDig2 = 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>
......@@ -315,7 +317,7 @@
},
data() {
return {
hpEnabled:1,
hpEnabled:2,
adduserDig: false,
remarkDig: false,
plDig: false,
......@@ -374,6 +376,7 @@
imgurl: '',
AuditStatusList: [],
reasonDig: false,
reasonDig2: false,
DropdownList: [],
checktableList: [],
checllen: 0,
......@@ -406,6 +409,7 @@
};
},
created() {
this.HpEnabled();
this.getList();
this.getplat();
this.getDown();
......@@ -414,13 +418,14 @@
this.GetDropdownList();
this.getUserList();
this.getGrade();
},
methods: {
openReasonNew(num,row){
this.addMsg.Type = num;
this.addMsg.UserIds = row.UserId;
this.addMsg.NewGradeId = row.HPGradeId;
this.reasonDig = true;
this.reasonDig2 = true;
this.hpUserInfo={};
this.SuperiorNum=0;
if(row.SuperiorId==0){
......@@ -430,7 +435,7 @@
}
},
getGrade(row){
this.apipost("/api/user/GetHpDistributorGradeList",{GradeName:''}, res => {
this.apipost("/api/user/GetHpDistributorGradeList",{GradeName:'',IsGuest:2}, res => {
if(res.data.resultCode==1){
this.hpGradeList=res.data.data;
}
......@@ -452,7 +457,7 @@
},
getReferrals(type, row) {
this.referMsg.ReferralsType = type;
this.referMsg.UserId = row.Id;
this.referMsg.UserId = row.UserId;
this.referDig = true;
this.getReferralsList();
},
......@@ -567,6 +572,7 @@
this.remarkDig = true;
},
openReason(num, row) {
this.SuperiorNum=0;
this.addMsg.Type = num;
this.addMsg.UserIds = row.UserId;
this.addMsg.NewGradeId = row.GradeId;
......@@ -600,6 +606,7 @@
this.getList();
this.Success(res.data.message)
this.reasonDig = false;
this.reasonDig2 = false;
this.remarkDig = false;
this.plDig = false;
......
......@@ -61,10 +61,10 @@
})
},
handleSelectionChange(val) {
if(val.length>this.ckGoods){
this.Info('超过了');
val=val.slice(0,this.ckGoods);
}
// if(val.length>this.ckGoods){
// this.Info('超过了');
// val=val.slice(0,this.ckGoods);
// }
this.selectRow = JSON.parse(JSON.stringify(val));
},
handleCurrentChange(val) {
......
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