Commit 5f315a59 authored by zhangjianguo's avatar zhangjianguo
parents 14e2721f b2aba15c
...@@ -97,3 +97,21 @@ ...@@ -97,3 +97,21 @@
.tableCenter td, .tableCenter th{ .tableCenter td, .tableCenter th{
text-align:center; text-align:center;
} }
.searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.searchInput{
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
\ No newline at end of file
<template>
<div v-loading="pageloading" class="RecSettings">
<div class="head-title">
推荐设置
</div>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px">
<el-card style="margin-top:10px" class="box-card">
<div slot="header" class="clearfix">
<span>商品详情页推荐设置</span>
</div>
<el-form-item label="推荐商品状态">
<el-switch
v-model="addMsg.DetailRecommendStatus"
active-color="#409EFF"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="推荐商品显示数量">
<el-input v-model="addMsg.DetailRecommendNum" style="width:635px" size="small">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
</el-card>
<el-card shadow="never" style="margin-top:10px" class="box-card">
<div slot="header" class="clearfix">
<span>订单完成后推荐设置</span>
</div>
<el-form-item label="推荐商品状态">
<el-switch
v-model="addMsg.OrderCompleteStatus"
active-color="#409EFF"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="自定义推荐商品">
<el-switch
v-model="addMsg.IsOrderRecommend"
active-color="#409EFF"
:active-value="1"
:inactive-value="0">
</el-switch>
<span>按商品列表排序显示前10件商品</span>
<template v-if="addMsg.IsOrderRecommend==1">
<div>
<div v-for="(item,index) in addMsg.OrderProductList" :key="index" class="goods-item">
<div :style="{backgroundImage:'url(' +domainManager().ImageUrl+ item.Image + ')'}" class="goods-pic"></div>
<el-button @click="spliceImg(1,index)" class="deleteBtn" size="mini" type="danger" icon="el-icon-close" circle></el-button>
</div>
</div>
<div @click="toggleCheck(1)" class="goods-add">
<el-button icon="el-icon-plus"></el-button>
</div>
</template>
</el-form-item>
</el-card>
<el-card shadow="never" style="margin-top:10px" class="box-card">
<div slot="header" class="clearfix">
<span>评论后推荐设置</span>
</div>
<el-form-item label="推荐商品状态">
<el-switch
v-model="addMsg.CommentRecommentStatus"
active-color="#409EFF"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
<el-form-item label="自定义推荐商品">
<el-switch
v-model="addMsg.IsCommentRecommend"
active-color="#409EFF"
:active-value="1"
:inactive-value="0">
</el-switch>
<span>按商品列表排序显示前10件商品</span>
<template v-if="addMsg.IsCommentRecommend==1">
<div>
<div v-for="(item,index) in addMsg.CommentProductList" :key="index" class="goods-item">
<div :style="{backgroundImage:'url(' +domainManager().ImageUrl+ item.Image + ')'}" class="goods-pic"></div>
<el-button @click="spliceImg(2,index)" class="deleteBtn" size="mini" type="danger" icon="el-icon-close" circle></el-button>
</div>
</div>
<div @click="toggleCheck(2)" class="goods-add">
<el-button icon="el-icon-plus"></el-button>
</div>
</template>
</el-form-item>
</el-card>
</el-form>
<div style="padding:20px;background:#fff;margin-top:10px">
<el-button @click="Save" size="small" type="primary">保存</el-button>
</div>
<!-- 新增规格模板 -->
<el-dialog title="充值" :visible.sync="ggmbDig" width="960px">
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入商品名称搜索"
v-model="msg.Name"
size="small"
@clear="getList"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<el-table
ref="tableData"
:data="tableData"
v-loading="loading"
@selection-change="selectionChange"
style="width: 100%;margin:20px 0">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="Id"
width="100"
label="ID">
</el-table-column>
<el-table-column
prop="Name"
label="名称">
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total">
</el-pagination>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="ggmbDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "RecSettings",
data(){
return{
pageloading:false,
addMsg:{},
rules:{},
ggmbDig:false,
msg:{
pageIndex:1,
pageSize:15,
Name:'',
},
total:0,
loading:false,
tableData:[],
commonList:[],
listType:1,
}
},
created(){
this.getData();
this.getList();
},
methods:{
Save(){
this.apipost("/api/product/SetProductRecommendSetInfo", this.addMsg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.getData();
this.Success(res.data.message);
}else{
this.Error(res.data.message);
}
})
},
spliceImg(num,index){
if(num==1){
this.addMsg.OrderProductList.splice(index,1)
}else{
this.addMsg.CommentProductList.splice(index,1)
}
},
toggleCheck(num){
this.listType=num;
this.ggmbDig=true;
this.$nextTick(()=>{
this.$refs.tableData.clearSelection();
})
},
submitForm(){
this.commonList.forEach(item=>{
item.Image=item.CoverImage;
})
if(this.listType==1){
this.addMsg.OrderProductList=this.commonList
}else{
this.addMsg.CommentProductList=this.commonList
}
this.ggmbDig=false;
},
selectionChange(val){
this.commonList=val;
},
getList(){
this.loading=true;
this.apipost("/api/product/GetProductGoodsDialogList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.total=res.data.data.count;
let pageData=res.data.data.pageData;
this.tableData=pageData;
}
})
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getData(){
this.pageloading=true;
this.apipost("/api/product/GetProductRecommendSetInfo",{}, res => {
this.pageloading=false;
if(res.data.resultCode==1){
this.addMsg=res.data.data;
}else {
this.Error(res.data.message);
}
})
},
},
};
</script>
<style>
.RecSettings .goods-add .el-button {
width: 100%;
height: 100%;
border: none;
border-radius: 0;
padding: 0;
}
.RecSettings .el-button--mini.is-circle{
padding:4px!important;
}
.RecSettings .deleteBtn {
position: absolute;
top: -6px;
right: -6px;
}
.RecSettings .goods-item ,.RecSettings .goods-add{
width: 50px;
height: 50px;
position: relative;
border: 1px solid #e2e2e2;
margin-right: 15px;
margin-bottom: 15px;
display: inline-block;
}
.RecSettings .goods-pic {
background-size: cover;
background-position: center;
width: 100%;
height: 100%;
background-color: #f6f6f6;
background-repeat: no-repeat;
}
</style>
<template>
<div class="SpeTemplate">
<div class="head-title">
规格模板
<el-button @click="openDig" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">新增模板管理</el-button>
</div>
<div class="content">
<div>
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入规格名搜索"
v-model="msg.Name"
@clear="getList"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
</div>
<el-table
:data="tableData"
v-loading="loading"
border
style="width: 100%;margin:20px 0">
<el-table-column
prop="Name"
width="300"
label="规格名">
</el-table-column>
<el-table-column
prop="address"
label="规格值">
<template slot-scope="scope">
<el-tag size="small" v-for="(item,index) in scope.row.SpecList" :key="index" style="margin:0 5px" type="info">{{item}}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="address"
width="200"
label="操作">
<template slot-scope="scope">
<img @click="Edit(scope.row)" style="width:32px;height:32px" 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>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
<!-- 新增规格模板 -->
<el-dialog custom-class="attr-template" title="充值" :visible.sync="ggmbDig" width="960px">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
<el-form-item label="规格名" prop="Name">
<el-input size="small" v-model="addMsg.Name" style="width:330px"></el-input>
</el-form-item>
<el-form-item label="规格值" prop="SpecList">
<div flex="dir:left" style="flex-wrap: wrap;">
<div v-for="(item,index) in SpecList" :key="index" class="attr-list">
<el-input size="small" v-model="item.num" style="width:152px"></el-input>
<i @click="deleteGgz(item,index)" class="el-icon-error close"></i>
</div>
<span @click="addGgz" class="point blue">添加规格值</span>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="ggmbDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('addMsg')">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "SpeTemplate",
data(){
return{
ggmbDig:false,
msg:{
pageIndex:1,
pageSize:15,
Name:'',
Id:0,
Content:'',
},
total:0,
tableData:[
{Name:'11'}
],
loading:false,
addMsg:{
Id:0,
Name:'',
SpecList:[],
},
rules:{
SpecList: [],
Name: [
{ required: true, message: '规格名不能为空', trigger: 'blur' }
],
},
SpecList:[],
}
},
created(){
this.getList();
},
methods:{
Delete(item){
let that=this;
that.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/product/DelProductSpecificationInfo',{SpecificationId:item.Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
});
},
Edit(row){
this.addMsg=row;
this.SpecList=[];
row.SpecList.forEach(item=>{
let obj={
num:item
}
this.SpecList.push(obj)
})
this.ggmbDig=true;
},
deleteGgz(item,index){
this.SpecList.splice(index,1);
},
addGgz(){
let obj={num:''}
this.SpecList.push(obj);
},
openDig(){
this.addMsg={
Id:0,
Name:'',
SpecList:[],
}
this.SpecList=[];
this.ggmbDig=true;
},
submitForm(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
for(let i=0;i<this.SpecList.length;i++){
if(this.SpecList[i].num==""){
this.Error("规格值不能为空");
return;
}
}
this.addMsg.SpecList=[];
this.SpecList.forEach(item=>{
this.addMsg.SpecList.push(item.num);
})
this.apipost('/api/product/SetProductSpecificationInfo',this.addMsg,
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
this.ggmbDig=false;
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList(){
this.loading=true;
this.apipost("/api/product/GetProductSpecificationPageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.total=res.data.data.count;
let pageData=res.data.data.pageData;
this.tableData=pageData;
}
})
},
},
};
</script>
<style>
.attr-template .attr-list {
display: inline-block;
margin-right: 10px;
margin-bottom: 10px;
position: relative;
cursor: move;
}
.attr-template .close {
position: absolute;
top: -4px;
right: -4px;
font-size: 16px;
cursor: pointer;
background: #ffffff;
}
.SpeTemplate .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.SpeTemplate .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.SpeTemplate .content .searchInput{
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
.SpeTemplate .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
</style>
...@@ -7,21 +7,31 @@ ...@@ -7,21 +7,31 @@
<div class="content"> <div class="content">
<el-form style="width:50%" :model="userInfo" :rules="rules" ref="userInfo" label-width="120px"> <el-form style="width:50%" :model="userInfo" :rules="rules" ref="userInfo" label-width="120px">
<el-form-item label="选择分类级别" prop="Tier"> <el-form-item label="选择分类级别" prop="Tier">
<el-radio :disabled="editState" v-model="userInfo.Tier" :label="1">一级分类</el-radio> <template v-if="editState">
<div @click="SelectTier(2)" style="display:inline-block;margin-right:18px"> <el-radio :disabled="editState" v-model="userInfo.Tier" :label="1">一级分类</el-radio>
<el-radio :disabled="editState" v-model="userInfo.Tier" :label="2">二级分类</el-radio> <el-radio :disabled="editState" v-model="userInfo.Tier" :label="2">二级分类</el-radio>
</div>
<div @click="SelectTier(3)" style="display:inline-block">
<el-radio :disabled="editState" v-model="userInfo.Tier" :label="3">三级分类</el-radio> <el-radio :disabled="editState" v-model="userInfo.Tier" :label="3">三级分类</el-radio>
</div> </template>
<template v-else>
<div @click="SelectTier(1)" style="display:inline-block;margin-right:18px">
<el-radio :disabled="editState" v-model="userInfo.Tier" :label="1">一级分类</el-radio>
</div>
<div @click="SelectTier(2)" style="display:inline-block;margin-right:18px">
<el-radio :disabled="editState" v-model="userInfo.Tier" :label="2">二级分类</el-radio>
</div>
<div @click="SelectTier(3)" style="display:inline-block">
<el-radio :disabled="editState" v-model="userInfo.Tier" :label="3">三级分类</el-radio>
</div>
</template>
</el-form-item> </el-form-item>
<el-form-item v-if="userInfo.Parent1Name && (userInfo.Tier==2 || userInfo.Tier==3)" label="一级分类"> <el-form-item v-if="userInfo.Parent1Name && (userInfo.Tier==2 || userInfo.Tier==3)" label="一级分类">
<span>{{userInfo.Parent1Name}}</span> <span>{{userInfo.Parent1Name}}</span>
<span @click="SelectTier(2)" v-if="userInfo.Tier==2" style="margin-left:10px" class="blue point">修改</span> <span @click="SelectTier(2)" v-if="userInfo.Tier==2 && !editState" style="margin-left:10px" class="blue point">修改</span>
</el-form-item> </el-form-item>
<el-form-item v-if="userInfo.Parent2Name && userInfo.Tier==3" label="二级分类"> <el-form-item v-if="userInfo.Parent2Name && userInfo.Tier==3" label="二级分类">
<span>{{userInfo.Parent2Name}}</span> <span>{{userInfo.Parent2Name}}</span>
<span @click="SelectTier(3)" style="margin-left:10px" class="blue point">修改</span> <span v-if="!editState" @click="SelectTier(3)" style="margin-left:10px" class="blue point">修改</span>
</el-form-item> </el-form-item>
<el-form-item label="分类名称" prop="Name"> <el-form-item label="分类名称" prop="Name">
<el-input v-model="userInfo.Name" size="small"></el-input> <el-input v-model="userInfo.Name" size="small"></el-input>
...@@ -106,7 +116,7 @@ ...@@ -106,7 +116,7 @@
<img v-if="imgDig==2" style="width:280px" src="../../assets/img/userman/example-2.png" alt=""> <img v-if="imgDig==2" style="width:280px" src="../../assets/img/userman/example-2.png" alt="">
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="czjfDig = false">我知道了</el-button> <el-button type="primary" size="small" @click="czjfDig = false">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 选择文件 --> <!-- 选择文件 -->
...@@ -128,9 +138,9 @@ ...@@ -128,9 +138,9 @@
</div> </div>
</div> </div>
<ul class="tierUl"> <ul class="tierUl">
<li :class="active1==index ? 'SelectLi' :''" @click="SelectTier1(item,index)" v-for="(item,index) in tableData" :key="index"> <li @click="SelectTier1(item,index,2)" :class="active1==index ? 'SelectLi' :''" v-for="(item,index) in tableData" :key="index">
<span>{{item.Name}}</span> <span>{{item.Name}}</span>
<span v-if="item.ChildList.length>0" style="float:right"> <span v-if="userInfo.Tier==3 && item.ChildList.length>0" style="float:right">
<i class="el-icon-arrow-right"></i> <i class="el-icon-arrow-right"></i>
</span> </span>
</li> </li>
...@@ -139,7 +149,7 @@ ...@@ -139,7 +149,7 @@
</div> </div>
</ul> </ul>
<ul v-if="userInfo.Tier==3" class="tierUl" style="margin-left:10px"> <ul v-if="userInfo.Tier==3" class="tierUl" style="margin-left:10px">
<li :class="active2==index ? 'SelectLi' :''" v-show="tableData2 && tableData2.ChildList" @click="SelectTier2(item,index)" v-for="(item,index) in tableData2.ChildList" :key="index"> <li @click="SelectTier2(item,index,3)" :class="active2==index ? 'SelectLi' :''" v-show="tableData2 && tableData2.ChildList" v-for="(item,index) in tableData2.ChildList" :key="index">
<span>{{item.Name}}</span> <span>{{item.Name}}</span>
</li> </li>
<div v-show="tableData2.ChildList && tableData2.ChildList.length==0" class="empty-text"> <div v-show="tableData2.ChildList && tableData2.ChildList.length==0" class="empty-text">
...@@ -148,7 +158,7 @@ ...@@ -148,7 +158,7 @@
</ul> </ul>
<div style="text-align:right;margin-top:20px" slot="footer" class="dialog-footer"> <div style="text-align:right;margin-top:20px" slot="footer" class="dialog-footer">
<el-button size="small" @click="ExitTier">取消</el-button> <el-button size="small" @click="ExitTier">取消</el-button>
<el-button type="primary" size="small" @click="tierDig = false">我知道了</el-button> <el-button type="primary" size="small" @click="TierOk">确定</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
...@@ -212,6 +222,7 @@ import ChooseImg from "@/components/global/ChooseImg.vue"; ...@@ -212,6 +222,7 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
active1:-1, active1:-1,
active2:-1, active2:-1,
keepData:{}, keepData:{},
tierOk:0,
}; };
}, },
created() { created() {
...@@ -220,36 +231,52 @@ import ChooseImg from "@/components/global/ChooseImg.vue"; ...@@ -220,36 +231,52 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
this.getData() this.getData()
this.editState=true; this.editState=true;
} }
else{
this.keepData=this.userInfo;
}
this.getList(); this.getList();
}, },
methods: { methods: {
TierOk(){
this.tierDig =false;
this.userInfo.Tier=this.tierOk;
},
ExitTier(){ ExitTier(){
this.userInfo.ParentId=0; this.userInfo.ParentId=this.keepData.ParentId;
this.userInfo.Parent1Name=this.keepData.Parent1Name; this.userInfo.Parent1Name=this.keepData.Parent1Name;
this.userInfo.Parent2Name=this.keepData.Parent2Name; this.userInfo.Parent2Name=this.keepData.Parent2Name;
this.tierDig =false; this.tierDig =false;
}, },
SelectTier2(item,index){ SelectTier2(item,index,num){
this.active2=index; this.active2=index;
this.userInfo.ParentId=this.tableData2.Id; this.userInfo.ParentId=item.Id;
this.userInfo.Parent2Name=item.Name; this.userInfo.Parent2Name=item.Name;
this.userInfo.Tier=3; this.tierOk=num;
}, },
SelectTier1(item,index){ SelectTier1(item,index,num){
this.tableData2=this.tableData[index]; this.tableData2=this.tableData[index];
this.active1=index; this.active1=index;
this.userInfo.ParentId=0; this.userInfo.ParentId=item.Id;
this.userInfo.Parent1Name=item.Name; this.userInfo.Parent1Name=item.Name;
this.userInfo.Tier=2; this.tierOk=num;
this.active2=-1;
this.userInfo.Parent2Name="";
}, },
SelectTier(num){ SelectTier(num){
this.tierDig=true; if(num==1){
this.active1=-1;
this.active2=-1;
this.userInfo.ParentId=this.keepData.ParentId;
this.userInfo.Parent1Name=this.keepData.Parent1Name;
this.userInfo.Parent2Name=this.keepData.Parent2Name;
}
if(num==2){ if(num==2){
this.tierDig=true;
this.titleDig='选择归属的一级分类'; this.titleDig='选择归属的一级分类';
this.tierWidth='20%' this.tierWidth='20%'
} }
if(num==3){ if(num==3){
this.tierDig=true;
this.titleDig='选择归属的二级分类'; this.titleDig='选择归属的二级分类';
this.tierWidth='600px' this.tierWidth='600px'
} }
...@@ -306,7 +333,7 @@ import ChooseImg from "@/components/global/ChooseImg.vue"; ...@@ -306,7 +333,7 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
getData(){ getData(){
this.apipost("/api/product/GetProductCategoryInfo",{CategoryId:this.UserId}, res => { this.apipost("/api/product/GetProductCategoryInfo",{CategoryId:this.UserId}, res => {
this.userInfo=res.data.data; this.userInfo=res.data.data;
this.keepData=re.data.data; this.keepData=res.data.data;
}) })
}, },
......
...@@ -490,7 +490,6 @@ export default { ...@@ -490,7 +490,6 @@ export default {
}, },
methods:{ methods:{
goUrl(item){ goUrl(item){
console.log("111",item);
if(item){ if(item){
this.$router.push({ this.$router.push({
name: 'addGoodsClass', name: 'addGoodsClass',
......
<template>
<div class="goodsList">
<div class="head-title">
商品列表
<el-button style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">商品导出</el-button>
<el-button @click="CommonJump('goodsServicesEdit')" 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 class="content">
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :dataId="0" label="全部" name="first"></el-tab-pane>
<el-tab-pane label="上架中" name="second"></el-tab-pane>
<el-tab-pane label="下架中" name="third"></el-tab-pane>
<el-tab-pane label="售罄" name="fourth"></el-tab-pane>
</el-tabs>
</div>
<div>
<el-button style="margin-right:20px;" size="small">分类筛选</el-button>
<span>添加时间:</span>
<el-date-picker
v-model="msg.val"
@change="getList"
size="small"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入名称搜索"
v-model="msg.Name"
@clear="getList"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<span class='blue point'>清空筛选条件</span>
</div>
<div style="margin-top:15px">
<el-button style="margin-left:10px;" size="mini">上架</el-button>
<el-button style="margin-left:10px;" size="mini">下架</el-button>
<el-button style="margin-left:10px;" size="mini">删除</el-button>
<el-button style="margin-left:10px;" size="mini">批量设置</el-button>
</div>
<el-table
:data="tableData"
v-loading="loading"
border
style="width: 100%;margin:20px 0">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
prop="Id"
width="80"
sortable
label="ID">
</el-table-column>
<el-table-column
prop="address"
sortable
label="排序">
<template slot-scope="scope">
<template v-if="!scope.row.editsort">
<span>{{scope.row.Sort}}</span>
<img @click="scope.row.editsort=true,scope.row.SortNew=scope.row.Sort" style="width:15px;height:15px;margin-left:7px" src="../../assets/img/userman/edit1.png" alt="">
</template>
<template v-else>
<el-input v-model="scope.row.SortNew" type="number" min="1" size="small" style="display:inline-block;width:150px"></el-input>
<span @click="scope.row.editsort=false" class="el-icon-error" style="color: rgb(245, 108, 108);"></span>
<span @click="Edit(scope.row,2)" class="el-icon-success" style="color:#67c23a"></span>
</template>
</template>
</el-table-column>
<el-table-column
prop="Remark"
label="分类">
<template slot-scope="scope">
<el-tag size="mini" v-for="(item,index) in scope.row.CategoryList" :key="index">{{item.CategoryName}}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="address"
width="300"
label="商品名称">
<template slot-scope="scope">
<div flex="box:first">
<img style="width:50px;height:50px;margin-right:1px" :src="domainManager().ImageUrl+scope.row.CoverImage" alt="">
<template v-if="!scope.row.editname">
<div flex="cross:top" style="display:inline-flex">
<div flex="dir:left" >
<el-tooltip class="item" effect="dark" :content="scope.row.Name" placement="top">
<div class="vue-line-clamp" style="word-break: break-all; -webkit-line-clamp: 2;">
<span>{{scope.row.Name}}</span>
</div>
</el-tooltip>
<img @click="scope.row.editname=true,scope.row.NameNew=scope.row.Name" style="width:15px;height:15px;margin-left:7px" src="../../assets/img/userman/edit1.png" alt="">
</div>
</div>
</template>
<template v-else>
<el-input v-model="scope.row.NameNew" type="number" min="1" size="small" style="display:inline-block;width:150px"></el-input>
<span @click="scope.row.editname=false" class="el-icon-error" style="color: rgb(245, 108, 108);"></span>
<span @click="Edit(scope.row,2)" class="el-icon-success" style="color:#67c23a"></span>
</template>
</div>
</template>
</el-table-column>
<el-table-column
prop="SellingPrice"
width="100"
sortable
label="售价">
</el-table-column>
<el-table-column
prop="InventoryNum"
width="100"
sortable
label="库存">
</el-table-column>
<el-table-column
prop="SalesNum"
width="105"
sortable
label="已出售量">
</el-table-column>
<el-table-column
prop="UpdateDate"
width="110"
label="是否加入快速购买">
<template slot-scope="scope">
<el-switch
@change="Edit(scope.row,1)"
v-model="scope.row.IsQuickBuy"
active-color="#409EFF"
:active-value="1"
:inactive-value="0">
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="CreateDate"
width="150"
label="添加时间">
</el-table-column>
<el-table-column
prop="UpdateDate"
width="100"
label="状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.GoodsStatus==1" type="success">销售中</el-tag>
<el-tag v-if="scope.row.GoodsStatus==2" type="warning">下架中</el-tag>
</template>
</el-table-column>
<el-table-column
prop="address"
width="200"
label="操作">
<template slot-scope="scope">
<img @click="Delete(scope.row)" 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>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "quickBuy",
data(){
return{
activeName:'first',
editState:false,
msg:{
pageIndex:1,
pageSize:15,
Name:'',
IsDefault:0,
},
total:0,
tableData:[],
loading:false,
addMsg:{
Id:0,
Sort:'',
Name:'',
IsDefault:1,
Remark:'',
UpdateType:1,
},
rules:{
CategoryIdNew: [
{ required: true, message: '分类不能为空', trigger: 'change' }
],
Sort: [
{ required: true, message: '请输入排序', trigger: 'blur' }
],
},
msg1:{
Id:0,
Name:'',
Tier:0,
ParentId:0,
Enabled:1,
IsShow:1,
},
}
},
created(){
this.getList();
},
methods:{
handleClick(val){
this.msg.AuditStatus=val.$attrs.dataId;
},
Delete(item){
let that=this;
that.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/product/DelProductServiceInfo',{ServiceId:item.Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
});
},
Edit(row,num){
let addMsg=row;
addMsg.Sort=addMsg.SortNew;
addMsg.UpdateType=num;
this.apipost('/api/product/SetProductServiceInfo',addMsg,
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList(){
this.loading=true;
this.apipost("/api/product/GetProductGoodsPageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.total=res.data.data.count;
let pageData=res.data.data.pageData;
pageData.forEach(item=>{
item.SortNew=item.Sort;
item.NameNew=item.Name;
item.editsort=false;
item.editname=false;
})
this.tableData=pageData;
}
})
},
},
};
</script>
<style>
.goodsList .vue-line-clamp {
display: block;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.goodsList .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
</style>
<template>
<div class="quickBuy">
<div class="head-title">
服务列表
<el-button @click="CommonJump('goodsServicesEdit')" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">添加服务</el-button>
</div>
<div class="content">
<div>
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入规格名搜索"
v-model="msg.Name"
@clear="getList"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<el-select size="small" @change="getList" v-model="msg.IsDefault" placeholder="请选择">
<el-option label="不限" :value="0"></el-option>
<el-option label="是" :value="1"></el-option>
<el-option label="否" :value="2"></el-option>
</el-select>
</div>
<el-table
:data="tableData"
v-loading="loading"
border
style="width: 100%;margin:20px 0">
<el-table-column
prop="Id"
width="80"
label="ID">
</el-table-column>
<el-table-column
prop="Name"
label="服务名称">
</el-table-column>
<el-table-column
prop="Remark"
label="备注">
</el-table-column>
<el-table-column
prop="address"
label="是否默认">
<template slot-scope="scope">
<el-switch
@change="Edit(scope.row,1)"
v-model="scope.row.IsDefault"
active-color="#409EFF"
:active-value="1"
:inactive-value="0">
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="address"
label="排序">
<template slot-scope="scope">
<template v-if="!scope.row.editState">
<span>{{scope.row.Sort}}</span>
<img @click="scope.row.editState=true,scope.row.SortNew=scope.row.Sort" style="width:15px;height:15px;margin-left:7px" src="../../assets/img/userman/edit1.png" alt="">
</template>
<template v-else>
<el-input v-model="scope.row.SortNew" type="number" min="1" size="small" style="display:inline-block;width:150px"></el-input>
<span @click="scope.row.editState=false" class="el-icon-error" style="color: rgb(245, 108, 108);"></span>
<span @click="Edit(scope.row,2)" class="el-icon-success" style="color:#67c23a"></span>
</template>
</template>
</el-table-column>
<el-table-column
prop="UpdateDate"
width="150"
label="添加日期">
</el-table-column>
<el-table-column
prop="address"
width="200"
label="操作">
<template slot-scope="scope">
<img @click="Delete(scope.row)" 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>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: "quickBuy",
data(){
return{
editState:false,
msg:{
pageIndex:1,
pageSize:15,
Name:'',
IsDefault:0,
},
total:0,
tableData:[],
loading:false,
addMsg:{
Id:0,
Sort:'',
Name:'',
IsDefault:1,
Remark:'',
UpdateType:1,
},
rules:{
CategoryIdNew: [
{ required: true, message: '分类不能为空', trigger: 'change' }
],
Sort: [
{ required: true, message: '请输入排序', trigger: 'blur' }
],
},
msg1:{
Id:0,
Name:'',
Tier:0,
ParentId:0,
Enabled:1,
IsShow:1,
},
}
},
created(){
this.getList();
},
methods:{
Delete(item){
let that=this;
that.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/product/DelProductServiceInfo',{ServiceId:item.Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
});
},
Edit(row,num){
let addMsg=row;
addMsg.Sort=addMsg.SortNew;
addMsg.UpdateType=num;
this.apipost('/api/product/SetProductServiceInfo',addMsg,
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList(){
this.loading=true;
this.apipost("/api/product/GetProductServicePageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.total=res.data.data.count;
let pageData=res.data.data.pageData;
pageData.forEach(item=>{
item.SortNew=item.Sort;
item.editState=false;
})
this.tableData=pageData;
}
})
},
},
};
</script>
<style>
.quickBuy .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.quickBuy .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.quickBuy .content .searchInput{
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
.quickBuy .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
</style>
<template>
<div v-loading="pageloading" class="goodsServicesEdit">
<div class="head-title">
<span @click="CommonJump('goodsServices')" class="blue point">服务</span> / 服务编辑
</div>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px">
<el-card shadow="never" style="margin-top:10px" class="box-card">
<el-form-item class="commonLabel discount" label="服务名称" prop="Name">
<el-tooltip class="item" effect="dark" content="例如:正品保障|极速发货|7天退换货" placement="top-start">
<i class=" elzk el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="addMsg.Name" style="width:690px" size="small">
</el-input>
</el-form-item>
<el-form-item label="排序" prop="Sort">
<el-input type="number" min="1" size="small" style="width:690px" placeholder="请输入" v-model="addMsg.Sort">
</el-input>
</el-form-item>
<el-form-item label="备注">
<el-input type="textarea" :row="2" style="width:690px" placeholder="请输入" v-model="addMsg.Remark">
</el-input>
</el-form-item>
<el-form-item label="是否默认">
<el-switch
v-model="addMsg.IsDefault"
active-color="#409EFF"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
</el-card>
</el-form>
<div style="padding:20px;background:#fff;margin-top:10px">
<el-button @click="Save('addMsg')" size="small" type="primary">保存</el-button>
</div>
</div>
</template>
<script>
export default {
name: "goodsServicesEdit",
data(){
return{
pageloading:false,
addMsg:{
Id:0,
Name:'',
Sort:100,
IsDefault:0,
Remark:'',
UpdateType:0,
},
rules:{
Name: [
{ required: true, message: '请输入服务名称', trigger: 'blur' },
],
Sort:[
{ required: true, message: '请输入排序', trigger: 'blur' },
],
},
}
},
created(){
// this.getData()
},
methods:{
Save(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost('/api/product/SetProductServiceInfo',this.addMsg,
res => {
if (res.data.resultCode === 1) {
this.CommonJump('goodsServices')
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
getData(){
this.pageloading=true;
this.apipost("/api/product/GetProductRecommendSetInfo",{}, res => {
this.pageloading=false;
if(res.data.resultCode==1){
this.addMsg=res.data.data;
}else {
this.Error(res.data.message);
}
})
},
},
};
</script>
<style>
.goodsServicesEdit .discount .el-form-item__label{
padding-right: 30px;
}
.goodsServicesEdit .el-form-item .elzk{
position: absolute;
left: -25px;
top:12px;
}
</style>
<template>
<div class="quickBuy">
<div class="head-title">
快速购买商品分类
<el-button @click="openDig" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">添加分类</el-button>
</div>
<div class="content">
<div>
<div class="searchInput" style="width:250px">
<el-input style="display:inline-block;width:225px;height:30px"
placeholder="请输入规格名搜索"
v-model="msg.Name"
@clear="getList"
size="small"
clearable>
</el-input>
<span @click="getList" class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span>
</div>
<span class="f12" style="padding:8px 15px;color:#909399;background-color: #f4f4f5;">温馨提示:商品分类修改至“
<span @click="CommonJump('goodsClassification')" class="blue f14 point">商品管理-分类</span>
”修改
</span>
</div>
<el-table
:data="tableData"
v-loading="loading"
border
style="width: 100%;margin:20px 0">
<el-table-column
prop="Id"
width="80"
label="ID">
</el-table-column>
<el-table-column
prop="CategoryName"
width="300"
label="分类名称">
</el-table-column>
<el-table-column
prop="address"
label="图标">
<template slot-scope="scope">
<img v-if="scope.row.IconPath!=''" style="width:50px;height:50px" :src="domainManager().ImageUrl+scope.row.IconPath" alt="">
<img v-else style="width:50px;height:50px" src="../../assets/img/default.png" alt="">
</template>
</el-table-column>
<el-table-column
prop="address"
label="排序">
<template slot-scope="scope">
<template v-if="!scope.row.editState">
<span>{{scope.row.Sort}}</span>
<img @click="scope.row.editState=true,scope.row.SortNew=scope.row.Sort" style="width:15px;height:15px;margin-left:7px" src="../../assets/img/userman/edit1.png" alt="">
</template>
<template v-else>
<el-input v-model="scope.row.SortNew" type="number" min="1" size="small" style="display:inline-block;width:200px"></el-input>
<span @click="scope.row.editState=false" class="el-icon-error" style="color: rgb(245, 108, 108);"></span>
<span @click="Edit(scope.row)" class="el-icon-success" style="color:#67c23a"></span>
</template>
</template>
</el-table-column>
<el-table-column
prop="CreateDate"
width="220"
label="添加日期">
</el-table-column>
<el-table-column
prop="address"
width="200"
label="操作">
<template slot-scope="scope">
<img @click="Delete(scope.row)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt="">
</template>
</el-table-column>
</el-table>
<el-pagination style="text-align:right"
background
@current-change="handleCurrentChange"
:page-size="msg.pageSize"
layout="prev, pager, next"
:total="total">
</el-pagination>
</div>
<!-- 新增规格模板 -->
<el-dialog title="新增" :visible.sync="ggmbDig" width="960px">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
<el-form-item label="分类" prop="CategoryIdNew">
<el-cascader
size="small"
:show-all-levels="false"
v-model="addMsg.CategoryIdNew"
:options="options"
:props="props"
></el-cascader>
</el-form-item>
<el-form-item label="排序" prop="Sort">
<el-input size="small" v-model="addMsg.Sort" style="width:330px"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="ggmbDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="submitForm('addMsg')">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "quickBuy",
data(){
return{
editState:false,
ggmbDig:false,
msg:{
pageIndex:1,
pageSize:15,
Name:'',
Id:0,
Content:'',
},
total:0,
tableData:[],
loading:false,
addMsg:{
Id:0,
Sort:'',
CategoryIdNew:[],
CategoryId:-1,
},
rules:{
CategoryIdNew: [
{ required: true, message: '分类不能为空', trigger: 'change' }
],
Sort: [
{ required: true, message: '请输入排序', trigger: 'blur' }
],
},
msg1:{
Id:0,
Name:'',
Tier:0,
ParentId:0,
Enabled:1,
IsShow:1,
},
props:{
checkStrictly: true,
label:'Name',
value:'Id',
children:'ChildList'
},
options:[],
}
},
created(){
this.getList();
this.getTreeList();
},
methods:{
Delete(item){
let that=this;
that.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/product/DelProductQuickBuyInfo',{QuickBuyId:item.Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
});
},
getTreeList(num){
this.loading=true;
this.apipost("/api/product/GetProductCategoryTreeList", this.msg1, res => {
this.loading=false;
if(res.data.resultCode==1){
let pageData=res.data.data;
this.options=pageData;
}
})
},
Edit(row){
let addMsg=row;
addMsg.Sort=addMsg.SortNew;
this.apipost('/api/product/SetProductQuickBuyInfo',addMsg,
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
},
deleteGgz(item,index){
this.SpecList.splice(index,1);
},
addGgz(){
let obj={num:''}
this.SpecList.push(obj);
},
openDig(){
this.addMsg={
Id:0,
Sort:'',
CategoryIdNew:[],
CategoryId:-1,
}
this.ggmbDig=true;
},
submitForm(formName){
let index=this.addMsg.CategoryIdNew.length-1;
this.addMsg.CategoryId=this.addMsg.CategoryIdNew[index];
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost('/api/product/SetProductQuickBuyInfo',this.addMsg,
res => {
if (res.data.resultCode === 1) {
this.getList();
this.Success(res.data.message)
this.ggmbDig=false;
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList(){
this.loading=true;
this.apipost("/api/product/GetProductQuickBuyPageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.total=res.data.data.count;
let pageData=res.data.data.pageData;
pageData.forEach(item=>{
item.SortNew=item.Sort;
item.editState=false;
})
this.tableData=pageData;
}
})
},
},
};
</script>
<style>
.quickBuy .content .searchInput{
border: 1px solid #DCDFE6;
border-radius: 4px;
}
.quickBuy .content .searchInput .el-input__inner{
border:none;outline:none;
height: 30px;
line-height: 30px;
}
.quickBuy .content .searchInput{
line-height: normal;
display: inline-table;
width: 100%;
border-collapse: separate;
border-spacing: 0;
width:250px;
margin-right: 20px;
}
.quickBuy .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
</style>
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
pageSize: 15, pageSize: 15,
NavIconName: "", NavIconName: "",
MallBaseId: 0, MallBaseId: 0,
NavIconIsShow:-1
}, },
total: 0, total: 0,
NavIconIsShowAdd: true, NavIconIsShowAdd: true,
......
...@@ -163,7 +163,6 @@ ...@@ -163,7 +163,6 @@
getData(){ getData(){
this.apipost("/api/user/GetMemberUserInfo",{UserId:this.UserId}, res => { this.apipost("/api/user/GetMemberUserInfo",{UserId:this.UserId}, res => {
console.log("res,res",res);
this.userInfo=res.data.data; this.userInfo=res.data.data;
}) })
}, },
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
pageSize: 15, pageSize: 15,
NavIconName: "", NavIconName: "",
MallBaseId: 0, MallBaseId: 0,
NavIconIsShow:0,
}, },
total: 0, total: 0,
navArr:[] navArr:[]
......
...@@ -2,12 +2,6 @@ ...@@ -2,12 +2,6 @@
.banner-container{ .banner-container{
background-color: #fff; background-color: #fff;
} }
.banner-container .el-carousel{
height:100%;
}
.banner-container .el-carousel__container{
height:100%;
}
.bannerStyle-item { .bannerStyle-item {
width: 100px; width: 100px;
border: 1px solid #ebeef5; border: 1px solid #ebeef5;
...@@ -56,8 +50,9 @@ ...@@ -56,8 +50,9 @@
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
padding: 5px; padding: 5px;
margin-bottom: 5px; margin-bottom: 5px;
position: relative;
} }
.navapp-image-upload .pic-box{ .banner_image_upload .pic-box{
width: 70px; width: 70px;
height: 70px; height: 70px;
border: 1px solid #ccc; border: 1px solid #ccc;
...@@ -79,7 +74,7 @@ ...@@ -79,7 +74,7 @@
position: absolute; position: absolute;
margin-left: 0; margin-left: 0;
} }
.navapp-image-upload .pic-box .size-tip { .banner_image_upload .pic-box .size-tip {
line-height: 1.35; line-height: 1.35;
text-align: center; text-align: center;
position: absolute; position: absolute;
...@@ -94,9 +89,32 @@ ...@@ -94,9 +89,32 @@
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
letter-spacing: -1px; letter-spacing: -1px;
} }
.navapp-image-upload .pic-box i { .banner_image_upload .pic-box i {
font-size: 22px; font-size: 12px;
color: #909399; color: #fff;
}
.banner_image_upload .image-delete {
position: absolute;
top: -10px;
right: -10px;
padding: 5px;
visibility: hidden;
z-index: 1;
}
.banner_image_upload:hover .image-delete{
visibility:visible;
}
.banner-container .banner-img {
height: 100%;
width: 100%;
background-repeat: no-repeat;
background-position: center;
}
.banner-container .banner-img-contain{
background-size: contain;
}
.banner-container .banner-img-cover{
background-size: cover;
} }
</style> </style>
<template> <template>
...@@ -109,22 +127,27 @@ ...@@ -109,22 +127,27 @@
</div> </div>
<div class="diy-component-preview"> <div class="diy-component-preview">
<div class="banner-container" :style="{height:banData.data.height+'px'}"> <div class="banner-container" :style="{height:banData.data.height+'px'}">
<el-carousel :interval="3000" arrow="always"> <el-carousel :interval="3000" arrow="always" v-if="banData.data.style==1" :height="banData.data.height+'px'">
<el-carousel-item v-for="item in 4" :key="item"> <el-carousel-item v-for="(item,index) in banData.data.banners" :key="index">
<h3>{{ item }}</h3> <div class="banner-img" :class="banData.data.fill==1?'banner-img-cover':'banner-img-contain'" :style="{backgroundImage:'url(http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+item.picUrl+')'}"></div>
</el-carousel-item>
</el-carousel>
<el-carousel v-else :interval="4000" type="card" :height="banData.data.height+'px'">
<el-carousel-item v-for="(item,index) in banData.data.banners" :key="index">
<div class="banner-img" :class="banData.data.fill==1?'banner-img-cover':'banner-img-contain'" :style="{backgroundImage:'url(http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+item.picUrl+')'}"></div>
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
</div> </div>
<div class="diy-component-edit" v-if="banData.isCked"> <div class="diy-component-edit" v-if="banData.isCked">
<el-form label-width="100px;"> <el-form label-width="100px">
<el-form-item label="样式"> <el-form-item label="样式">
<div flex="dir:left"> <div flex="dir:left">
<div class="bannerStyle-item banner_active"> <div class="bannerStyle-item" :class="{'banner_active':banData.data.style==1}" @click="banData.data.style=1">
<div class="banner-style-1"></div> <div class="banner-style-1"></div>
<div>样式1</div> <div>样式1</div>
</div> </div>
<div class="bannerStyle-item" style="margin-left:5px;"> <div class="bannerStyle-item" style="margin-left:5px;" :class="{'banner_active':banData.data.style==2}" @click="banData.data.style=2">
<div flex class="banner-style-2"> <div flex class="banner-style-2">
<div></div> <div></div>
<div></div> <div></div>
...@@ -151,14 +174,15 @@ ...@@ -151,14 +174,15 @@
<div flex="dir:top"> <div flex="dir:top">
<div class="banner-edit-item" v-for="(item,index) in banData.data.banners" :key="index"> <div class="banner-edit-item" v-for="(item,index) in banData.data.banners" :key="index">
<div class="banner-edit-options"> <div class="banner-edit-options">
<el-button type="primary" icon="el-icon-delete" @click="delBanner(index)" style="top: -6px; right: -31px;"></el-button> <el-button type="primary" icon="el-icon-delete" @click="delBanner(index)" style="position:absolute;top: -1px; right: -26px;"></el-button>
</div> </div>
<div flex="box:first"> <div flex="box:first">
<div> <div>
<div class="navapp-image-upload" style="margin-right:5px;"> <div class="banner_image_upload" style="margin-right:5px;">
<div flex="main:center cross:center" class="pic-box" :style="{backgroundImage:'url(' + item.picUrl + ')'}"> <div flex="main:center cross:center" @click="choiceMyImg(index)" class="pic-box" :style="{backgroundImage:'url(http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + item.picUrl + ')'}">
<i class="el-icon-picture-outline" v-if="item.picUrl==''"></i> <i style="font-size:22px;color:#909399;" class="el-icon-picture-outline" v-if="item.picUrl==''"></i>
<div class="size-tip">720 × 250</div> <div class="size-tip">720 × 250</div>
<el-button type="danger" v-if="item.picUrl!=''" class="image-delete" size="mini" icon="el-icon-close" @click.stop="item.picUrl=''" circle></el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -183,21 +207,28 @@ ...@@ -183,21 +207,28 @@
<el-button size="small" type="danger" @click="getChoiceLink()">确 定</el-button> <el-button size="small" type="danger" @click="getChoiceLink()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 选择图片文件 -->
<el-dialog title="选择文件" :visible.sync="choicImg" width="1240px">
<ChooseImg @SelectId="SelectId"></ChooseImg>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import chooseMeun from "../../common/chooseMeun.vue"; import chooseMeun from "../../common/chooseMeun.vue";
import ChooseImg from "@/components/global/ChooseImg.vue";
export default { export default {
props: ["banData","index","dataLeng"], props: ["banData","index","dataLeng"],
data() { data() {
return { return {
isShowLink:false, isShowLink:false,
choicImg:false,
commonIndex:0, commonIndex:0,
}; };
}, },
components: { components: {
chooseMeun, chooseMeun,
ChooseImg
}, },
created() { created() {
...@@ -228,8 +259,20 @@ ...@@ -228,8 +259,20 @@
this.banData.data.banners[this.commonIndex].url=obj.PageUrl; this.banData.data.banners[this.commonIndex].url=obj.PageUrl;
this.isShowLink = false; this.isShowLink = false;
}, },
//选取图片
choiceMyImg(index){
this.choicImg = true;
this.commonIndex=index;
},
//选择图片
SelectId(msg){
this.banData.data.banners[this.commonIndex].picUrl=msg.url;
this.choicImg=false;
},
//向父组件传值 并调用排序
resetSord(IsUp){
this.$emit('getSord', this.index,IsUp);
},
}, },
mounted() { mounted() {
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
backgroundImage:'url(http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + navData.data.backgroundPicUrl + ')'}"> backgroundImage:'url(http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + navData.data.backgroundPicUrl + ')'}">
<div flex="dir:left" style="width:750px;flex-wrap:wrap;"> <div flex="dir:left" style="width:750px;flex-wrap:wrap;">
<div class="Headernav-item" v-for="(item,index) in navData.data.navs" :key="index" :style="{width:getNavWidth(navData.data.columns)}"> <div class="Headernav-item" v-for="(item,index) in navData.data.navs" :key="index" :style="{width:getNavWidth(navData.data.columns)}">
<img :src="item.icon"/> <img :src="'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+item.icon"/>
<div style="color: rgb(53, 53, 53);">{{item.name}}</div> <div style="color: rgb(53, 53, 53);">{{item.name}}</div>
</div> </div>
</div> </div>
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
<el-switch v-model="navData.data.scroll"></el-switch> <el-switch v-model="navData.data.scroll"></el-switch>
</el-form-item> </el-form-item>
<el-form-item label="拉取商城导航"> <el-form-item label="拉取商城导航">
<el-button size="small" @click="isShowLink=true">选择</el-button> <el-button size="small" @click="isShowNavLink=true">选择</el-button>
</el-form-item> </el-form-item>
<el-form-item label="导航图标"> <el-form-item label="导航图标">
<div flex="dir:top"> <div flex="dir:top">
...@@ -186,9 +186,10 @@ ...@@ -186,9 +186,10 @@
<div flex="dir:left box:first cross:center"> <div flex="dir:left box:first cross:center">
<div> <div>
<div class="navapp-image-upload"> <div class="navapp-image-upload">
<div flex="main:center cross:center" class="pic-box" :style="{backgroundImage:'url(' + item.icon + ')'}"> <div flex="main:center cross:center" @click="choiceMyImg(index)" class="pic-box" :style="{backgroundImage:'url(' + getIconLink(item.icon) + ')'}">
<i class="el-icon-picture-outline" v-if="item.icon==''"></i> <i class="el-icon-picture-outline" v-if="item.icon==''"></i>
<div class="size-tip">88 × 88</div> <div class="size-tip">88 × 88</div>
<el-button type="danger" v-if="item.icon!=''" class="image-delete" size="mini" icon="el-icon-close" @click.stop="item.icon=''" circle></el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -217,7 +218,7 @@ ...@@ -217,7 +218,7 @@
</el-form-item> </el-form-item>
<el-form-item label="上传背景" v-if="navData.data.showImg"> <el-form-item label="上传背景" v-if="navData.data.showImg">
<div style="line-height:normal;display:inline-block;"> <div style="line-height:normal;display:inline-block;">
<div class="navigation_pic_boxDiv" @click="choicImg=true" flex="main:center cross:center" :style="{backgroundImage:'url(http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + navData.data.backgroundPicUrl + ')'}"> <div class="navigation_pic_boxDiv" @click="choicImg=true,selectType=1" flex="main:center cross:center" :style="{backgroundImage:'url(http://viitto-1301420277.cos.ap-chengdu.myqcloud.com' + navData.data.backgroundPicUrl + ')'}">
<i class="el-icon-picture-outline" v-if="navData.data.backgroundPicUrl==''"></i> <i class="el-icon-picture-outline" v-if="navData.data.backgroundPicUrl==''"></i>
<el-button type="danger" class="image-delete" v-if="navData.data.backgroundPicUrl!=''" size="mini" icon="el-icon-close" @click.stop="navData.data.backgroundPicUrl=''" circle></el-button> <el-button type="danger" class="image-delete" v-if="navData.data.backgroundPicUrl!=''" size="mini" icon="el-icon-close" @click.stop="navData.data.backgroundPicUrl=''" circle></el-button>
</div> </div>
...@@ -297,6 +298,7 @@ ...@@ -297,6 +298,7 @@
commonIndex:0, commonIndex:0,
//选择图片弹窗 //选择图片弹窗
choicImg:false, choicImg:false,
selectType:1,
}; };
}, },
components: { components: {
...@@ -358,14 +360,33 @@ ...@@ -358,14 +360,33 @@
}, },
//选择图片 //选择图片
SelectId(msg){ SelectId(msg){
this.navData.data.backgroundPicUrl=msg.url; if(this.selectType==1){
this.navData.data.backgroundPicUrl=msg.url;
}else{
this.navData.data.navs[this.commonIndex].icon=msg.url;
}
this.choicImg=false; this.choicImg=false;
}, },
//向父组件传值 并调用排序 //向父组件传值 并调用排序
resetSord(IsUp){ resetSord(IsUp){
this.$emit('getSord', this.index,IsUp); this.$emit('getSord', this.index,IsUp);
},
//选取图片
choiceMyImg(index){
this.choicImg=true;
this.commonIndex=index;
this.selectType=2;
},
//判断是否包含http
getIconLink(url){
let str=''
if(url.indexOf('http')!=-1){
str=url
}else{
str= 'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+url
}
return str;
} }
}, },
mounted() { mounted() {
......
<style>
.diy-rubik .layout {
width: 750px;
position: relative;
}
.diy-rubik .layout .rubik {
position: absolute;
top: 0;
left: 0;
border: 1px dashed #c9c9c9;
cursor: pointer;
color: #c9c9c9;
z-index: 11;
}
.diy-component-preview{
background-color: #fff;
}
.diy-component-preview:hover {
box-shadow: inset 0 0 10000px rgba(0, 0, 0, .03);
}
</style>
<template>
<div :class="{'active':rubData.isCked}">
<div class="diy-component-options" v-if="rubData.isCked">
<el-button type="primary" icon="el-icon-delete" style="left: -25px; top: 0px;"></el-button>
<el-button type="primary" icon="el-icon-document-copy" style="left: -25px; top: 30px;"></el-button>
<el-button type="primary" icon="el-icon-arrow-up" v-if="index>0" @click="resetSord(0)" style="right: -25px; top: 0;"></el-button>
<el-button type="primary" icon="el-icon-arrow-down" v-if="index!=dataLeng-1" @click="resetSord(1)" style="right: -25px; top: 30px;"></el-button>
</div>
<div class="diy-rubik">
<div class="diy-component-preview">
<div class="layout" style="height:360px;">
<div class="rubik" style="width:100%;height:100%;z-index:16;"></div>
<!-- <div flex="main:center cross:center" class="rubik" style="x: 0px; y: 0px; width: calc(100% - 0px); height: calc(100% - 0px); left: 0%; top: 0%;">
<span>宽度为750,不限高度</span>
</div> -->
</div>
</div>
<div class="diy-component-edit" v-if="rubData.isCked">
</div>
</div>
</div>
</template>
<script>
export default {
props: ["rubData","index","dataLeng"],
data() {
return {
};
},
created() {
},
methods: {
// 魔方展示样式(preview)
blockStyle(index) {
// if (index === 8) {
// let per = 750 / this.data.w;
// this.data.height = this.data.h * 750 / this.data.w;
// return `height: ${this.data.height}px;background-image: url('${this.img}');background-size: ${per}px ${per}px;`;
// } else {
// if (index === 0) {
// this.data.height = 'auto';
// return `height: ${this.data.list[0].pic_url ? 'auto' : '360px'}`;
// }
// return `height: ${this.style_list[index] ? this.style_list[index].height : 360}px`;
// }
},
},
mounted() {
}
};
</script>
...@@ -195,6 +195,7 @@ ...@@ -195,6 +195,7 @@
<search v-if="item.Id=='search'" :searchData="item" @getSord="getSord" :index="index" :dataLeng="dataList.length"></search> <search v-if="item.Id=='search'" :searchData="item" @getSord="getSord" :index="index" :dataLeng="dataList.length"></search>
<navigationIcon v-if="item.Id=='nav'" :navData="item" @getSord="getSord" :index="index" :dataLeng="dataList.length"></navigationIcon> <navigationIcon v-if="item.Id=='nav'" :navData="item" @getSord="getSord" :index="index" :dataLeng="dataList.length"></navigationIcon>
<banner v-if="item.Id=='banner'" :banData="item" @getSord="getSord" :index="index" :dataLeng="dataList.length"></banner> <banner v-if="item.Id=='banner'" :banData="item" @getSord="getSord" :index="index" :dataLeng="dataList.length"></banner>
<rubik v-if="item.Id=='rubik'" :rubData="item" @getSord="getSord" :index="index" :dataLeng="dataList.length"></rubik>
</div> </div>
</div> </div>
</div> </div>
...@@ -210,6 +211,7 @@ ...@@ -210,6 +211,7 @@
import search from "../sallCenter/plugin/search.vue" import search from "../sallCenter/plugin/search.vue"
import navigationIcon from "../sallCenter/plugin/navigationIcon.vue" import navigationIcon from "../sallCenter/plugin/navigationIcon.vue"
import banner from "../sallCenter/plugin/banner.vue" import banner from "../sallCenter/plugin/banner.vue"
import rubik from "../sallCenter/plugin/rubik.vue"
export default { export default {
data() { data() {
return { return {
...@@ -226,6 +228,7 @@ ...@@ -226,6 +228,7 @@
search, search,
navigationIcon, navigationIcon,
banner, banner,
rubik
}, },
methods: { methods: {
//获取左侧菜单 //获取左侧菜单
...@@ -280,6 +283,7 @@ ...@@ -280,6 +283,7 @@
} }
} }
this.dataList.push(navObj); this.dataList.push(navObj);
console.log(this.dataList,'this.dataList');
break; break;
case 'banner': case 'banner':
let banObj={ let banObj={
...@@ -294,6 +298,22 @@ ...@@ -294,6 +298,22 @@
} }
this.dataList.push(banObj); this.dataList.push(banObj);
break; break;
case 'rubik':
let rubObj={
Id:'rubik',
isCked:false,
data:{
style:-1,
space:0,
height:0,
w:1,
h:1,
list:[],
hotspot:[]
}
}
this.dataList.push(rubObj);
break;
} }
}, },
//给子组件调用 重新排序上移下移 //给子组件调用 重新排序上移下移
......
...@@ -176,6 +176,44 @@ export default new Router({ ...@@ -176,6 +176,44 @@ export default new Router({
name: 'addGoodsClass', name: 'addGoodsClass',
component: resolve => require(['@/components/CommodityMan/addGoodsClass'], resolve), component: resolve => require(['@/components/CommodityMan/addGoodsClass'], resolve),
}, },
// 商品管理 规格模板
{
path: '/SpecificationTemplate',
name: 'SpecificationTemplate',
component: resolve => require(['@/components/CommodityMan/SpecificationTemplate'], resolve),
},
// 商品管理 快速购买
{
path: '/quickBuy',
name: 'quickBuy',
component: resolve => require(['@/components/CommodityMan/quickBuy'], resolve),
},
// 商品管理 推荐设置
{
path: '/RecSettings',
name: 'RecSettings',
component: resolve => require(['@/components/CommodityMan/RecSettings'], resolve),
},
// 商品管理 商品服务
{
path: '/goodsServices',
name: 'goodsServices',
component: resolve => require(['@/components/CommodityMan/goodsServices'], resolve),
},
// 商品管理 商品服务新增或修改
{
path: '/goodsServicesEdit',
name: 'goodsServicesEdit',
component: resolve => require(['@/components/CommodityMan/goodsServicesEdit'], resolve),
},
// 商品管理 商品列表
{
path: '/goodsList',
name: 'goodsList',
component: resolve => require(['@/components/CommodityMan/goodsList'], resolve),
},
//设置 基础设置 //设置 基础设置
{ {
path: '/basicSetUp', path: '/basicSetUp',
......
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