Commit 1ea7173c authored by zhengke's avatar zhengke
parents ef1ec8e6 458c11ff
......@@ -8,7 +8,8 @@
<div style="margin-top:10px;background:#fff;padding:20px">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="商品分类" name="first">
<div style="margin-bottom:18px">
<div style="margin-bottom:18px;display: flex;flex-direction: row;align-items: center;justify-content: space-between">
<div>
<template v-if="!dragState">
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
......@@ -20,12 +21,21 @@
<span @click="getSearch" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<el-button @click="dragState=true" style="margin-left:10x;" size="small" type="primary">编辑排序</el-button>
</template>
<template v-if="dragState">
<el-button :loading="saveBtnLoad" @click="addSort" size="small" type="primary">保存排序</el-button>
<el-button @click="dragState=false" style="margin:0 10x;" size="small" type="primary">取消编辑</el-button>
<span>拖动分类名称排序</span>
</template>
</div>
<div>
分类的显示
<el-radio v-model="SetPro" label="1" @change="SetProduct(1)">隐藏</el-radio>
<el-radio v-model="SetPro" label="2" @change="SetProduct(2)">显示</el-radio>
</div>
</div>
<div v-loading="loading" flex="dir:left box:mean" class="cat-list nopadding">
<el-card class="card-item-box" shadow="never">
......@@ -450,6 +460,7 @@ export default {
val:'',
activeName:'first',
dragState:false,
SetPro:'0',
msg1:{
Id:0,
Name:'',
......@@ -842,6 +853,17 @@ export default {
})
},
SetProduct(type){//分类的显示/隐藏
this.apipost("/api/product/SetProductCategoryShow", {IsShow:type}, res => {
this.loading=false;
if(res.data.resultCode==1){
this.Success(res.data.message)
}else {
this.Error(res.data.message);
}
})
}
},
};
</script>
......
......@@ -13,7 +13,7 @@
<el-form-item label="是否开启">
<el-radio v-model="addMsg.IsOpen" :label="2">开启</el-radio>
<el-radio v-model="addMsg.IsOpen" :label="1" @change="addMsg.CustomMinPriceRate = 0 ,addMsg.CustomMaxPriceRate = 0,addMsg.CustomMinFixedPrice = 0,addMsg.CustomMaxFixedPrice = 0">不开启</el-radio>
<el-radio v-model="addMsg.IsOpen" :label="1" >不开启</el-radio>
</el-form-item>
<el-form-item label="是否需要审核" >
<el-radio v-model="addMsg.IsExamine" :label="2">开启</el-radio>
......@@ -254,11 +254,11 @@
Save(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if(this.addMsg.PriceType==1 && this.addMsg.CustomMinPriceRate>=this.addMsg.CustomMaxPriceRate){
if(this.addMsg.IsOpen==2 && this.addMsg.CustomMinPriceRate>=this.addMsg.CustomMaxPriceRate){
this.Error('区间比例从低到高')
return
}
if(this.addMsg.PriceType==2 && this.addMsg.CustomMinFixedPrice>=this.addMsg.CustomMaxFixedPrice){
if(this.addMsg.IsOpen==2&& this.addMsg.CustomMinFixedPrice>=this.addMsg.CustomMaxFixedPrice){
this.Error('区间价格从低到高')
return
}
......
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