Commit 7bb153c0 authored by 黄媛媛's avatar 黄媛媛

update

parent 534694f6
......@@ -6,8 +6,11 @@
<el-button @click="SelectRecycled(2)" style="float:right;margin-top: -5px;" size="small" type="primary">回收站</el-button>
</div>
<div v-loading="loading" style="margin-top:10px;background:#fff;padding:20px">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="图片" name="first">
<div class="TabDiv">
<span :class="commonType==1?'spanActive':''" @click="handleClick(1)">图片</span>
<span :class="commonType==2?'spanActive':''" @click="handleClick(2)">视频</span>
</div>
<div>
<div style="height: 718px;" flex="box:first">
<div style="margin-right: 15px;width: auto;-webkit-box-flex: 0;flex-shrink: 0;flex-grow: 0;">
<el-button @click="addGroup" style="margin-bottom: 12px;" type="primary" size="small">添加分组</el-button>
......@@ -49,16 +52,20 @@
<span>全部</span>
<div style="display:inline-block;float:right">
<div style="margin-left: 20px;display:inline-block;" class="appendInput">
<el-input size="small" style="width:250px" placeholder="请输入内容" v-model="val">
<el-input size="small" style="width:250px" placeholder="请输入内容" v-model="PageMsg.Name">
<el-button @click="GetPageList" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<el-checkbox style="margin-left:12px" :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-button style="margin:0 12px" size="small">删除</el-button>
<el-checkbox style="margin-left:12px" :indeterminate="isIndeterminate" v-model="checkAll" @change="CheckAllChange">全选</el-checkbox>
<el-button v-if="PageMsg.Recycled==1" @click="HsPage" style="margin:0 12px" size="small">删除</el-button>
<el-button v-if="PageMsg.Recycled==2" @click="HYPage" style="margin-left:12px" size="small">还原</el-button>
<el-button v-if="PageMsg.Recycled==2" @click="DeletePage" size="small">删除11</el-button>
<el-dropdown v-if="scgroupMsg.Recycled==1" size="small" split-button>
移动至
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item,index) in groupList" :key="index">{{item.Name}}</el-dropdown-item>
<el-dropdown-item v-for="(item,index) in groupList" :key="index">
<div @click="SelectPageId(item)">{{item.Name}}</div>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
......@@ -66,6 +73,7 @@
</div>
<div style="border: 1px solid rgb(227, 227, 227);height:674px">
<div class="basefix app-attachment-list">
<template v-if="PageMsg.Type==1">
<div class="material-item material-upload">
<div class="app-upload" flex="main:center cross:center" style="width: 140px; height: 140px;">
<el-upload class="avatar-uploader" action=""
......@@ -90,9 +98,37 @@
</div>
</div>
</el-tooltip>
</template>
<template v-if="PageMsg.Type==2">
<div class="material-item material-upload">
<div class="app-upload" flex="main:center cross:center" style="width: 140px; height: 140px;">
<el-upload class="avatar-uploader" action=""
accept="video/mp4,video/ogg,video/webm"
:show-file-list="false" :http-request="UploadImage">
<i class="el-icon-upload"></i>
</el-upload>
</div>
</div>
<el-tooltip v-for="(item,index) in PageList" :key="index" class="item" effect="dark" :content="item.Name" placement="top-start">
<div @click="PageSelect(item,index)" :class="item.Selected ? 'selected' :''" class="el-tooltip item material-item ">
<img :src="'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+item.Path+'?x-oss-process=video/snapshot,t_9,f_jpg,w_299,h_0,m_fast'" class="material-img" style="width: 140px; height: 140px;">
<div class="material-video-info"><i class="el-icon-video-play"></i> <span>{{item.VideoTime}}</span></div>
<div flex="dir:left" style="margin-top: 5px;">
<div class="material-name">{{item.Name}}</div>
<div style="margin: 0px 5px;">|</div>
<div>
<button type="button" class="el-button el-button--text" style="padding: 0px;">
<span @click="EditPage(item)">编辑</span>
</button>
</div>
</div>
</div>
</el-tooltip>
</template>
</div>
<div style="padding-right:10px">
<el-pagination style="text-align:right"
background
:current-page="currentPage4"
......@@ -107,9 +143,8 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="视频" name="second">配置管理</el-tab-pane>
</el-tabs>
</div>
<input type="text" ref="dur" name='0'/>
</div>
<!-- 新增分组 -->
<el-dialog title="分组管理" :visible.sync="addGroupMsgDig" width="400px">
......@@ -231,12 +266,111 @@ export default {
},
methods:{
SelectPageId(item){
this.PageList.forEach(item=>{
if(item.Selected){
this.checkList.push(item.Id)
}
})
if(this.checkList.length==0){
this.Error("至少选择一项!");
return;
}
let MaterialIds= this.checkList.join(",");
let msg={
MaterialIds:MaterialIds,
GroupId:item.Id,
Type:this.commonType
}
this.apipost("/api/product/SetMaterialInfoTransfer",msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.GetPageList();
this.checkList=[];
}
})
},
// 全选
CheckAllChange(val){
this.PageList.forEach(item=>{
if(val){
item.Selected=true;
}else{
item.Selected=false;
}
})
},
// 删除
DeletePage(){
this.checkList=[];
this.PageList.forEach(item=>{
if(item.Selected){
this.checkList.push(item.Id)
}
})
if(this.checkList.length==0){
this.Error("至少选择一项!");
return;
}
let MaterialIds= this.checkList.join(",");
this.loading=true;
this.apipost("/api/product/DelMaterialInfo",{MaterialIds:MaterialIds}, res => {
this.loading=false;
if(res.data.resultCode==1){
this.GetPageList();
this.checkList=[];
}
})
},
// 还原
HYPage(){
this.checkList=[];
this.PageList.forEach(item=>{
if(item.Selected){
this.checkList.push(item.Id)
}
})
if(this.checkList.length==0){
this.Error("至少选择一项!");
return;
}
let MaterialIds= this.checkList.join(",");
this.loading=true;
this.apipost("/api/product/SetMaterialInfoRestore",{MaterialIds:MaterialIds}, res => {
this.loading=false;
if(res.data.resultCode==1){
this.GetPageList();
this.checkList=[];
}
})
},
// 回收
HsPage(){
this.checkList=[];
this.PageList.forEach(item=>{
if(item.Selected){
this.checkList.push(item.Id)
}
})
if(this.checkList.length==0){
this.Error("至少选择一项!");
return;
}
let MaterialIds= this.checkList.join(",");
this.loading=true;
this.apipost("/api/product/SetMaterialInfoRecycled",{MaterialIds:MaterialIds}, res => {
this.loading=false;
if(res.data.resultCode==1){
this.GetPageList();
this.checkList=[];
}
})
},
// 单个删除
PageSelect(item,index){
item.Selected=!item.Selected;
if(item.Selected){
this.checkList.push(item.Id);
}
},
// 数组去重
unique(arr) {
......@@ -245,10 +379,7 @@ export default {
return arr.indexOf(item, 0) === index;
});
},
// 全选
handleCheckAllChange(){
},
SelectGroup(id){
this.PageMsg.GroupId=id;
this.GetPageList();
......@@ -290,6 +421,10 @@ export default {
UploadImage(file) {
this.UploadFileToTencent(this.FileType().GoodsImg, file.file, res => {
if (res.resultCode == 1) {
if(this.addpageMsg.Type==2){
this.addpageMsg.Image = res.FileUrl;
}
console.log(" this.addpageMsg.Image", this.addpageMsg.Image)
this.addpageMsg.Path = res.FileUrl;
this.addpageMsg.Name = res.FileName;
this.addPageList();
......@@ -309,6 +444,7 @@ export default {
this.scgroupMsg.Recycled=num;
this.PageMsg.Recycled=num;
this.GetMemberGradeList();
this.GetPageList();
},
EditGroup(item){
this.addGroupMsgDig=true;
......@@ -443,7 +579,12 @@ export default {
})
},
handleClick(val){
this.commonType=Number(val.index)+1;
this.commonType=val;
this.scgroupMsg.Type=val;
this.PageMsg.Type=val;
this.addpageMsg.Type=val;
this.GetMemberGradeList();
this.GetPageList();
},
handleCurrentChange(val) {
......@@ -456,6 +597,32 @@ export default {
</script>
<style>
.materialMan .material-video-info {
background: rgba(0, 0, 0, .35);
color: #fff;
position: absolute;
left: 10px;
bottom: 31px;
padding: 1px 3px;
font-size: 14px;
}
.materialMan .TabDiv .spanActive{
border-bottom: 2px solid #409EFF;
color:#409EFF;
}
.materialMan .TabDiv span{
font-size: 14px;
margin-right: 20px;
display: inline-block;
height: 100%;
cursor: pointer;
}
.materialMan .TabDiv{
height: 40px;
line-height: 40px;
border-bottom: 2px solid #f3f3f3;
margin-bottom: 20px;
}
.materialMan .selectActive .el-icon-tickets{
color: #409EFF;
}
......
......@@ -64,7 +64,7 @@
width="200"
label="操作">
<template slot-scope="scope">
<img style="width:32px;height:32px" src="../../assets/img/userman/edit.png" alt="">
<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="">
<!-- <img style="width:32px;height:32px" src="../../assets/img/userman/balance.png" alt=""> -->
</template>
......@@ -110,6 +110,15 @@
this.getList();
},
methods: {
Edit(row){
this.$router.push({
name: 'setMember',
query: {
GradeId:row.Id,
blank: "y"
}
});
},
Delete(row){
let that=this;
that.Confirm("是否删除?", function () {
......
......@@ -2,10 +2,34 @@
<template>
<div class="baseSet">
<div class="head-title">
<span @click="goUrl" class="blue point">会员等级</span> / 会员设置
<span @click="goUrl" class="point">基础设置</span>
</div>
<div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>分销设置</span>
</div>
<div>
<el-form-item label="分销层级" prop="name">
<el-radio v-model="val" label="1">关闭</el-radio>
<el-radio v-model="val" label="2">一级分销</el-radio>
<el-radio v-model="val" label="2">二级分销</el-radio>
<el-radio v-model="val" label="2">三级分销</el-radio>
</el-form-item>
<el-form-item class="discount commonLabel" label="分销内购" prop="name">
<el-tooltip class="item" effect="dark" content="开启分销内购,分销商自己购买商品,享受一级佣金,上级享受二级佣金,上上级享受三级佣金" placement="top">
<i class="elzk el-tooltip el-icon-info"></i>
</el-tooltip>
<el-switch
v-model="addMsg.name"
active-color="#409EFF"
active-value="100"
inactive-value="0">
</el-switch>
</el-form-item>
</div>
</el-card>
<el-form-item label="会员等级" prop="name">
<el-select style="width:293px;" size="small" v-model="addMsg.name" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
......@@ -205,7 +229,6 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
.baseSet .content{
background: #fff;
margin-top:10px;
padding: 20px;
box-sizing: border-box;
}
......
<template>
<div class="setMember usersList">
<div v-loading="loading" class="setMember usersList">
<div class="head-title">
<span @click="goUrl" class="blue point">会员等级</span> / 会员设置
</div>
<div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px">
<el-form-item label="会员等级" prop="name">
<el-select style="width:293px;" size="small" v-model="addMsg.name" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
<el-form-item label="会员等级" prop="Grade">
<el-select style="width:293px;" size="small" v-model="addMsg.Grade" placeholder="请选择">
<el-option
v-for="(item,index) in 100"
:key="index"
:label="`等级${index+1}`"
:value="index+1">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="等级名称" prop="name">
<el-input style="width:293px;" size="small" v-model="addMsg.name"></el-input>
<el-form-item label="等级名称" prop="Name">
<el-input style="width:293px;" size="small" v-model="addMsg.Name" placeholder="请输入等级名称"></el-input>
</el-form-item>
<el-form-item class="discount commonLabel" label="折扣" prop="name">
<el-form-item class="discount commonLabel" label="折扣" prop="Discount">
<el-tooltip class="item" effect="dark" content="请输入0.1~10之间的数字" placement="top-start">
<i class="elzk el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input style="width:293px;" type="number" min="0.1" size="small" placeholder="请输入内容" v-model="addMsg.name" class="input-with-select">
<el-input style="width:293px;" type="number" min="0.1" size="small" placeholder="请输入内容" v-model="addMsg.Discount" class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
<el-form-item label="会员状态" prop="name">
<el-form-item label="会员状态" prop="Enabled">
<el-switch
v-model="addMsg.name"
v-model="addMsg.Enabled"
active-color="#409EFF"
active-value="100"
inactive-value="0">
:active-value="1"
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item label="会员图标" prop="name">
<el-button @click="openChangeDig" size="small">选择文件</el-button>
<div><img style="width:80px;height:80px" src="../../assets/img/default.png" alt=""></div>
<el-form-item label="会员图标" prop="Icon">
<el-button @click="openChangeDig('Icon')" size="small">选择文件</el-button>
<div>
<img v-if="addMsg.IconPath==''" style="width:80px;height:80px" src="../../assets/img/default.png" alt="">
<img v-else style="width:80px;height:80px" :src="'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+addMsg.IconPath" alt="">
</div>
</el-form-item>
<el-form-item label="会员背景色" prop="name">
<el-button @click="openChangeDig" size="small">选择文件</el-button>
<div><img style="width:80px;height:80px" src="../../assets/img/default.png" alt=""></div>
<el-form-item label="会员背景色" prop="BackgroundImage">
<el-button @click="openChangeDig('BackgroundImage')" size="small">选择文件</el-button>
<div>
<img v-if="addMsg.BackgroundImagePath==''" style="width:80px;height:80px" src="../../assets/img/default.png" alt="">
<img v-else style="width:80px;height:80px" :src="'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+addMsg.BackgroundImagePath" alt="">
</div>
</el-form-item>
<el-form-item label="累计金额自动升级">
<el-switch
v-model="addMsg.name"
v-model="addMsg.IsAutoUpGrade"
active-color="#409EFF"
active-value="100"
inactive-value="0">
:active-value="1"
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item class="commonLabel" label="升级条件" prop="name">
<el-input style="width:293px;" type="number" min="0.1" size="small" placeholder="请输入内容" v-model="addMsg.name" class="input-with-select">
<el-form-item class="commonLabel" label="升级条件" prop="UpGradeMoney">
<el-input style="width:293px;" type="number" min="0.1" size="small" placeholder="请输入内容" v-model="addMsg.UpGradeMoney" class="input-with-select">
<template slot="prepend">累计完成订单金额满</template>
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
<el-form-item label="会员是否可购买">
<el-switch
v-model="addMsg.name"
v-model="addMsg.IsMemberBuy"
active-color="#409EFF"
active-value="100"
inactive-value="0">
:active-value="1"
:inactive-value="2">
</el-switch>
</el-form-item>
<el-form-item class="commonLabel" label="购买价格" prop="name">
<el-input style="width:293px;" type="number" min="0.1" size="small" placeholder="请输入购买价格" v-model="addMsg.name" class="input-with-select">
<el-form-item class="commonLabel" label="购买价格" prop="MemberBuyMoney">
<el-input style="width:293px;" type="number" min="0.1" size="small" placeholder="请输入购买价格" v-model="addMsg.MemberBuyMoney" class="input-with-select">
<el-button slot="append"></el-button>
</el-input>
</el-form-item>
<el-form-item label="h会员权益(多条)">
<div style="width:700px;">
<div v-if="addMsg.EquityList.length>0" style="width:700px;">
<el-table class="setTable"
:data="tableData"
:data="addMsg.EquityList"
border
style="margin-bottom:20px">
<el-table-column
......@@ -77,7 +88,7 @@
width="180px"
label="权益标题">
<template slot-scope="scope">
<el-input style="width:159px" size="small" v-model="val" placeholder="请输入内容"></el-input>
<el-input style="width:159px" size="small" v-model="scope.row.Title" placeholder="请输入内容"></el-input>
</template>
</el-table-column>
<el-table-column
......@@ -85,8 +96,9 @@
width="180px"
label="权益图标">
<template slot-scope="scope">
<el-button @click="openChangeDig" size="small">选择图片</el-button>
<img style="margin-left: 10px;width:50px;height:50px" src="../../assets/img/default.png" alt="">
<el-button @click="openChangeDig('qy',scope.$index)" size="small">选择图片</el-button>
<img v-if="scope.row.ImagePath==''" style="margin-left: 10px;width:50px;height:50px" src="../../assets/img/default.png" alt="">
<img v-else style="margin-left: 10px;width:50px;height:50px" :src="'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+scope.row.ImagePath" alt="">
</template>
</el-table-column>
<el-table-column
......@@ -98,40 +110,39 @@
type="textarea"
:rows="2"
placeholder="请输入内容"
v-model="val">
v-model="scope.row.Content">
</el-input>
</template>
</el-table-column>
<el-table-column
prop="address"
width="80px"
label="操作">
<template>
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<img style="width:32px;height:32px" src="../../assets/img/userman/del.png" alt="">
<img @click.prevent="Delete(scope.$index)" style="width:32px;height:32px" src="../../assets/img/userman/del.png" alt="">
</el-tooltip>
</template>
</el-table-column>
</el-table>
</div>
<div>
<div class="point">
<i class="el-icon-plus" style="font-weight: bolder;margin-left:5px;color:#409EFF"></i>
<span style="color: rgb(53, 53, 53);font-size: 14px;">新增权益</span>
<span @click="addEquityList" style="color: rgb(53, 53, 53);font-size: 14px;">新增权益</span>
</div>
</el-form-item>
<el-form-item label="会员规则" prop="name">
<el-form-item label="会员规则" prop="MemberSpecification">
</el-form-item>
</el-form>
</div>
<div style="margin-top:20px">
<el-button size="small" type="primary" @click="dialogVisible = false">保存</el-button>
<el-button size="small" type="primary" @click="Save('addMsg')">保存</el-button>
</div>
<!-- 选择文件 -->
<el-dialog title="选择文件" :visible.sync="changeState" width="1240px">
<ChooseImg></ChooseImg>
<ChooseImg @SelectId="SelectId" ref="mychild"></ChooseImg>
</el-dialog>
</div>
</template>
......@@ -143,10 +154,28 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
},
data() {
return {
icon1:'',
icon2:'',
icon3:'',
currentPage4:3,
changeState:false,
val:'',
addMsg:{},
addMsg:{
EquityList:[],
Id:0,
Grade:'',
Name:'',
Discount:0,
Enabled:2,
Icon:'',
BackgroundImage:'',
IsAutoUpGrade:1,
UpGradeMoney:'',
IsMemberBuy:1,
MemberBuyMoney:'',
MemberSpecification:'',
MallBaseId:this.getLocalStorage().MallBaseId,
},
dialogVisible:false,
value:'',
options:[],
......@@ -159,21 +188,90 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
},
total:0,
rules: {
name: [
{ required: true, message: '新手机号', trigger: 'blur' }
Grade: [
{ required: true, message: '请选择会员等级', trigger: 'change' }
],
Name: [
{ required: true, message: '请输入等级名称', trigger: 'blur' }
],
Discount:[
{ required: true, message: '请输入折扣', trigger: 'blur' }
],
UpGradeMoney:[
{ required: true, message: '请输入金额', trigger: 'blur' }
],
MemberBuyMoney:[
{ required: true, message: '请输入金额', trigger: 'blur' }
],
},
imgType:'',
imgIndex:-1,
GradeId:0,
};
},
created() {
if(this.$route.query.GradeId){
this.GradeId=this.$route.query.GradeId;
this.getData()
}
},
methods: {
openChangeDig(){
openChangeDig(str,index){
this.imgType=str;
this.changeState=true;
this.imgIndex=index;
},
SelectId(msg){
this.changeState=false;
if(this.imgType=='Icon'){
this.addMsg.Icon=msg.selectId;
this.addMsg.IconPath=msg.url;
}
if(this.imgType=='BackgroundImage'){
this.addMsg.BackgroundImage=msg.selectId;
this.addMsg.BackgroundImagePath=msg.url;
}
if(this.imgType=='qy'){
let imgIndex=this.imgIndex;
this.addMsg.EquityList[imgIndex].Image=msg.selectId;
this.addMsg.EquityList[imgIndex].ImagePath=msg.url;
}
},
addEquityList(){
let obj={
Id:0,
Title:'',
Content:'',
Image:'',
ImagePath:'',
};
this.addMsg.EquityList.push(obj)
},
Delete(index){
this.addMsg.EquityList.splice(index, 1);
},
Save(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
let cmd="/api/user/SetMemberGradeInfo";
this.apipost(cmd,this.addMsg,
res => {
if (res.data.resultCode === 1) {
this.goUrl();
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
goUrl(){
this.$router.push({
name: 'MembershipGrade',
......@@ -182,12 +280,16 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
}
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList(){
getData(){
this.loading=true;
this.apipost("/api/user/GetMemberGradeInfo", {GradeId:this.GradeId}, res => {
this.loading=false;
if(res.data.resultCode==1){
this.addMsg=res.data.data;
this.addMsg.MallBaseId=this.getLocalStorage().MallBaseId
}
})
},
},
......
......@@ -68,7 +68,10 @@
label="头像">
<template slot-scope="scope">
<div class="app-image" :style="{backgroundImage:'url(' + scope.row.Photo + ')',backgroundSize:'cover'}"></div>
<div flex="dir:left cross:center">{{scope.row.Name}}</div>
<div flex="dir:left cross:center">
{{scope.row.Name}}
<span v-if="scope.row.AliasName!=''" class="remark_name">备注名:{{scope.row.AliasName}}</span>
</div>
<img v-if="scope.row.Source==1" style="width:24px;height:24px" src="../../assets/img/userman/wx.png" alt="" class="platform-img">
<button type="button" class="el-button el-button--success" style="float: right; padding: 5px !important;">
<span @click="ChangeOpenidState(scope.$index, scope.row)">显示OpenId</span>
......@@ -166,7 +169,7 @@
</el-dialog>
<!-- 选择文件 -->
<el-dialog title="选择文件" :visible.sync="changeState" width="1240px">
<ChooseImg></ChooseImg>
<ChooseImg @SelectId="SelectId" ref="mychild"></ChooseImg>
</el-dialog>
<!-- 充值积分 -->
<el-dialog title="充值" :visible.sync="czjfDig" width="600px">
......@@ -184,8 +187,8 @@
<el-form-item label="充值图片">
<el-button @click="openChangeDig" size="small">选择文件</el-button>
<div>
<img style="width:80px;height:80px" src="../../assets/img/default.png" alt="">
<img style="width:80px;height:80px" :src="addMsg.Image" alt="">
<img v-if="imgurl==''" style="width:80px;height:80px" src="../../assets/img/default.png" alt="">
<img v-else style="width:80px;height:80px" :src="imgurl" alt="">
</div>
</el-form-item>
<el-form-item label="备注">
......@@ -249,6 +252,7 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
Image:'',
Description:'',
},
imgurl:'',
};
},
......@@ -257,12 +261,19 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
this.getplat();
this.getDown();
this.GetMemberGradeList();
this.addMsg.MallBaseId=this.getLocalStorage().MallBaseId;
},
methods: {
SelectId(msg){
this.changeState=false;
this.addMsg.Image=msg.id;
this.imgurl="http://viitto-1301420277.cos.ap-chengdu.myqcloud.com"+msg.url;
},
EditgoUrl(row){
this.$router.push({
name: 'usersListEdit',
query: {
UserId:row.Id,
blank: "y"
}
});
......@@ -298,7 +309,7 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
this.czType=index;
this.czjfDig=true;
this.addMsg={
MallBaseId:0,
MallBaseId:this.getLocalStorage().MallBaseId,
Type:1,
UserId:row.Id,
Integral:'',
......@@ -306,9 +317,14 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
Description:'',
Balance:'',
}
this.imgurl='';
},
openChangeDig(){
this.changeState=true;
setTimeout(()=>{
this.$refs.mychild.InitData(this.czType);
},10)
},
Export(){
this.msg.ExcelEnumIds=this.checkedCities;
......@@ -386,6 +402,12 @@ import ChooseImg from "@/components/global/ChooseImg.vue";
</script>
<style>
.usersList .remark_name {
color: #888888;
font-size: 12px;
margin-left: 10px;
float: right;
}
.usersList .app-image{
background-position: center center;
width: 50px;
......
......@@ -7,26 +7,33 @@
<div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="150px">
<el-form-item label="用户">
<div class="app-image" style="background-image: url(https://wx.qlogo.cn/mmopen/vi_32/oGIVrPVN31icEqGbm2lHxwnutS3mD9xx40ZRx2E7U8cFicdY2YFAlZtfSXwjYvQicA9ggpSf5BtdPfoIreCialklKg/132); "></div>
<div class="app-image" :style="{backgroundImage:'url(' + userInfo.Photo + ')',backgroundSize:'cover'}"></div>
</el-form-item>
<el-form-item label="会员等级">
<el-select style="width:293px;" size="small" v-model="addMsg.name" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
<el-select style="width:293px;" size="small" v-model="userInfo.MemberGrade" placeholder="请选择活动区域">
<el-option label="普通用户" :value="0"></el-option>
<el-option
v-for="(item,index) in 100"
:key="index"
:label="`等级${index+1}`"
:value="index+1">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="上级">
<el-autocomplete
size="small"
v-model="val"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelect"
></el-autocomplete>
<el-select size="small" v-model="userInfo.SuperiorId" :filter-method="ChangeListName" filterable placeholder="请选择">
<el-option label="总部" :value="0"></el-option>
<el-option
v-for="item in tableData"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="加入黑名单">
<el-switch
v-model="addMsg.name"
v-model="userInfo.Blacklist"
active-color="#409EFF"
active-value="100"
inactive-value="0">
......@@ -34,25 +41,25 @@
<span class="tip">加入黑名单后,用户将无法下单</span>
</el-form-item>
<el-form-item label="联系方式">
<el-input v-model="val" style="width:478px" size="small"></el-input>
<el-input v-model="userInfo.ContactWay" style="width:478px" size="small"></el-input>
</el-form-item>
<el-form-item label="手机号">
<el-input v-model="val" style="width:478px" size="small"></el-input>
<el-input v-model="userInfo.Moblie" style="width:478px" size="small"></el-input>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="val" style="width:478px" size="small"></el-input>
<el-input v-model="userInfo.Remark" style="width:478px" size="small"></el-input>
</el-form-item>
<el-form-item label="修改备注名">
<el-input v-model="val" style="width:478px" size="small"></el-input>
<el-input v-model="userInfo.AliasName" style="width:478px" size="small"></el-input>
</el-form-item>
<el-form-item label="注册时间">
<span>2020-04-23 13:37:53</span>
<span>{{userInfo.CreateDate}}</span>
</el-form-item>
</el-form>
</div>
<div style="margin-top:20px">
<el-button size="small" type="primary" @click="dialogVisible = false">保存</el-button>
<el-button size="small" type="primary" @click="Save">保存</el-button>
</div>
</div>
</template>
......@@ -60,51 +67,87 @@
export default {
data() {
return {
currentPage4:3,
changeState:false,
addMsg:{
Id:'',
SuperiorId:'',
MemberGrade:'',
ContactWay:'',
Remark:'',
AliasName:'',
},
val:'',
addMsg:{},
dialogVisible:false,
value:'',
options:[],
tableData:[
{ID:'111'}
],
msg:{
pageIndex:1,
pageSize:15,
},
total:0,
rules: {
name: [
{ required: true, message: '新手机号', trigger: 'blur' }
],
},
restaurants: [
{ "value": "三全鲜食(北新泾店)", "address": "长宁区新渔路144号" },
{ "value": "Hot honey 首尔炸鸡(仙霞路)", "address": "上海市长宁区淞虹路661号" },
{ "value": "新旺角茶餐厅", "address": "上海市普陀区真北路988号创邑金沙谷6号楼113" },
{ "value": "泷千家(天山西路店)", "address": "天山西路438号" },
{ "value": "胖仙女纸杯蛋糕(上海凌空店)", "address": "上海市长宁区金钟路968号1幢18号楼一层商铺18-101" },
{ "value": "贡茶", "address": "上海市长宁区金钟路633号" },
{ "value": "豪大大香鸡排超级奶爸", "address": "上海市嘉定区曹安公路曹安路1685号" },
],
restaurants: [],
UserId:'',
userInfo:{},
msg:{
pageIndex:1,
pageSize:20,
Name:'',
Source:0,
MemberGrade:0,
Id:0,
Moblie:''
},
tableData:[],
};
},
created() {
if(this.$route.query.UserId){
this.UserId=this.$route.query.UserId;
this.getData()
this.getList();
}
},
methods: {
Save(){
let userInfo=this.userInfo;
this.addMsg={
Id:userInfo.Id,
SuperiorId:userInfo.SuperiorId,
MemberGrade:userInfo.MemberGrade,
ContactWay:userInfo.ContactWay,
Remark:userInfo.Remark,
AliasName:userInfo.AliasName,
}
this.apipost("/api/user/SetMemberUserInfoForHT",this.addMsg, res => {
if(res.data.resultCode==1){
this.goUrl();
}else {
this.Error(res.data.message);
}
})
},
handleSelect(item) {
console.log(item);
},
ChangeListName(val){
this.msg.Name=val;
this.getList();
},
getList(){
this.loading=true;
this.apipost("/api/user/GetMemberUserDropDownList", 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;
}
})
},
querySearch(queryString, cb) {
var restaurants = this.restaurants;
var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
// 调用 callback 返回建议列表的数据
cb(results);
},
openChangeDig(){
this.changeState=true;
......@@ -117,12 +160,12 @@
}
});
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
getList(){
getData(){
this.apipost("/api/user/GetMemberUserInfo",{UserId:this.UserId}, res => {
console.log("res,res",res);
this.userInfo=res.data.data;
})
},
},
......
<template>
<div class="ChooseImg">
<el-row style="border: 1px solid rgb(227, 227, 227);">
<el-row v-loading="loading" style="border: 1px solid rgb(227, 227, 227);">
<el-col :span="6" style="border-right: 1px solid rgb(227, 227, 227);">
<el-button style="margin-top: 12px;margin-left: 5%;" type="primary" size="small">添加分组</el-button>
<el-button @click="addGroup" style="margin-top: 12px;margin-left: 5%;" type="primary" size="small">添加分组</el-button>
<div style="margin:20px 0">
<el-input v-model="val" style="width:90%;margin:0 5%" placeholder="请输入分类名称搜索" size="small"></el-input>
<el-input v-model="searchVal" style="width:90%;margin:0 5%" placeholder="请输入分类名称搜索" size="small"></el-input>
</div>
<div class="el-scrollbar" style="height: 450px; width: 100%;">
<div class="el-scrollbar__wrap" style="margin-bottom: -8px; margin-right: -8px;">
<div class="el-scrollbar__view">
<li class="el-menu-item" style="padding-left: 10px;padding-right: 10px;">
<li :class="PageMsg.GroupId==0?'selectActive' : ''" @click="SelectGroup(0)" class="el-menu-item" style="padding-left: 10px;padding-right: 10px;">
<i class="el-icon-tickets"></i>
<span>全部</span>
<span >全部</span>
</li>
<li v-for="item in 9" class="el-menu-item" style="padding-left: 10px;padding-right: 10px;">
<li :class="PageMsg.GroupId==item.Id?'selectActive' : ''" @click="SelectGroup(item.Id)" v-for="(item,index) in NewItems" :key="index" class="el-menu-item" style="padding-left: 10px;padding-right: 10px;">
<div flex="dir:left box:last">
<el-col :span="18" style="overflow: hidden; text-overflow: ellipsis;">
<i class="el-icon-tickets"></i>
<span>羊肚菌</span>
<span>{{item.Name}}</span>
</el-col>
<el-col class="blue" :span="6">
<span>编辑</span> | <span>删除</span>
<span v-if="scgroupMsg.Recycled==1" @click.prevent="EditGroup(item)">编辑</span>
| <span v-if="scgroupMsg.Recycled==1" @click.prevent="HsGroup(item)">删除</span>
</el-col>
</div>
</li>
......@@ -30,26 +31,29 @@
</el-col>
<el-col :span="18">
<div style="margin-top: 10px;margin-left: 20px;" class="appendInput">
<el-input size="small" style="width:250px" placeholder="请输入内容" v-model="val">
<el-button slot="append" icon="el-icon-search"></el-button>
<el-input size="small" style="width:250px" placeholder="请输入内容" v-model="PageMsg.Name">
<el-button @click="GetPageList" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<div class="basefix app-attachment-list">
<div class="app-attachment-item app-attachment-upload">
<div class="app-upload" flex="main:center cross:center" style="width: 100px; height: 100px;">
<el-upload class="avatar-uploader" action=""
accept="image/jpeg,image/gif,image/png,image/bmp"
:show-file-list="false" :http-request="UploadImage">
<i class="el-icon-upload"></i>
<input type="file" accept="image/*" multiple="multiple" style="display: none;">
</el-upload>
</div>
</div>
<el-tooltip class="item" effect="dark" content="Top Left 提示文字" placement="top-start">
<div class="el-tooltip item app-attachment-item" >
<img src="https://cdnimg.iotweixin.com/uploads/mall1285/20200422/58aac71950e2d86e6d7138484a3f7f7e.jpg" class="app-attachment-img" style="width: 100px; height: 100px;">
<div class="app-attachment-name">微信图片_20200422125658.jpg</div>
<el-tooltip v-for="(item,index) in PageList" :key="index" class="item" effect="dark" :content="item.Name" placement="top-start">
<div @click="PageSelect(item,index)" :class="selectId==item.Id ? 'selected' :''" class="el-tooltip item app-attachment-item" >
<img :src="'http://viitto-1301420277.cos.ap-chengdu.myqcloud.com'+item.Path" class="app-attachment-img" style="width: 100px; height: 100px;">
<div class="app-attachment-name">{{item.Name}}</div>
</div>
</el-tooltip>
</div>
<div>
<div style="padding-right:10px">
<el-pagination style="text-align:right"
background
:current-page="currentPage4"
......@@ -62,9 +66,31 @@
</el-col>
</el-row>
<div style="margin-top:20px;text-align:right">
<el-button size="small" type="primary" @click="changeState = false">选定</el-button>
<el-button size="small" type="primary" @click="SelectImgId">选定</el-button>
</div>
<!-- 新增分组 -->
<el-dialog :modal="false" :modal-append-to-body='false' title="分组管理" :visible.sync="addGroupMsgDig" width="400px">
<el-form :model="addGroupMsg" :rules="addGroupMsgrules" ref="addGroupMsg" label-width="100px">
<el-form-item label="分组名称" prop="Name">
<el-input
size="small"
type="text"
placeholder="请输入内容"
v-model="addGroupMsg.Name"
maxlength="8"
show-word-limit
>
</el-input>
</el-form-item>
<el-form-item label="排序" prop="Sort">
<el-input @keyup.native="checkInteger(addGroupMsg,'Sort')" size="small" v-model="addGroupMsg.Sort"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="addGroupMsgDig = false">取 消</el-button>
<el-button size="small" type="primary" @click="GroupsubmitForm('addGroupMsg')">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -73,6 +99,8 @@ export default {
name: 'ChooseImg',
data(){
return{
czType:0,
searchVal:'',
val:'',
Id:'',
currentPage4:1,
......@@ -81,24 +109,201 @@ export default {
pageSize:15,
},
total:0,
loading:false,
scgroupMsg:{
Id:0,
Name:'',
Type:1,
Recycled:1,
},
groupList:[],
PageMsg:{
Id:0,
Name:'',
Type:1,
Recycled:1,
pageIndex:1,
pageSize:15,
GroupId:0,
},
PageList:[],
addGroupMsgDig:false,
pageMsgDig:false,
addGroupMsg:{
Id:0,
Name:'',
Type:'',
Sort:'',
},
addGroupMsgrules:{
Name: [{
required: true,
message: '请填写分组名称',
trigger: 'blur'
}],
Sort: [{
required: true,
message: '请填写排序',
trigger: 'blur'
}],
},
addpageMsg:{
Id:0,
Name:'',
Type:1,
GroupId:0,
Path:'',
Image:'',
VideoTime:0,
WithHeight:0,
},
selectId:-1,
emitmsg:{},
}
},
created(){
},
computed: {
NewItems() {
var _this = this;
var NewItems = [];
this.groupList.map(function(item) {
if (item.Name.search(_this.searchVal) != -1) {
NewItems.push(item);
}
});
return NewItems;
}
},
mounted(){
this.GetMemberGradeList();
this.GetPageList();
},
methods:{
InitData(id){
this.Id=id;
this.msg.Id=id;
// this.getOperation();
// this.getDataInfo();
InitData(Type){
this.czType=Type;
this.selectId=-1;
},
SelectImgId(){
this.$emit('SelectId',this.emitmsg)
this.selectId=-1;
},
UploadImage(file) {
this.UploadFileToTencent(this.FileType().GoodsImg, file.file, res => {
if (res.resultCode == 1) {
this.addpageMsg.Path = res.FileUrl;
this.addpageMsg.Name = res.FileName;
this.addPageList();
}
})
},
// 新增素材信息
addPageList(){
this.apipost("/api/product/SetMaterialInfo",this.addpageMsg, res => {
if(res.data.resultCode==1){
this.GetPageList();
}
})
},
PageSelect(item){
this.emitmsg={
selectId:item.Id,
url:item.Path
}
this.selectId=item.Id;
},
addGroup(){
this.addGroupMsgDig=true;
this.addGroupMsg={
Id:0,
Name:'',
Type:1,
Sort:'',
}
},
HsGroup(item){
let that=this;
that.$confirm('是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/product/SetMaterialGroupRecycled',{GroupId:item.Id},
res => {
if (res.data.resultCode === 1) {
this.GetMemberGradeList();
this.Success(res.data.message)
} else {
this.Error(res.data.message);
}
},
null
);
}).catch(() => {
});
},
EditGroup(item){
this.addGroupMsgDig=true;
this.addGroupMsg={
Id:item.Id,
Name:item.Name,
Type:item.Type,
Sort:item.Sort,
}
},
GroupsubmitForm (formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.apipost('/api/product/SetMaterialGroupInfo',this.addGroupMsg,
res => {
if (res.data.resultCode === 1) {
this.GetMemberGradeList();
this.Success(res.data.message)
this.addGroupMsgDig=false;
} else {
this.Error(res.data.message);
}
},
null
);
} else {
return false;
}
});
},
SelectGroup(id){
this.PageMsg.GroupId=id;
this.GetPageList();
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
// this.getList();
this.GetPageList();
},
GetMemberGradeList(){
this.loading=true;
this.apipost("/api/product/GetMaterialGroupList",this.scgroupMsg, res => {
this.loading=false;
this.groupList=res.data.data;
})
},
GetPageList(){
this.loading=true;
this.apipost("/api/product/GetMaterialInfoPageList",this.PageMsg, res => {
this.loading=false;
this.total=res.data.data.count;
let data=res.data.data.pageData;
this.PageList=data;
})
},
},
......@@ -106,6 +311,20 @@ export default {
</script>
<style>
.ChooseImg .el-input.is-active .el-input__inner, .ChooseImg .el-input__inner:focus{
border-color: #DCDFE6;
}
.ChooseImg .app-attachment-list .selected {
box-shadow: 0 0 0 1px #1ed0ff;
background: #daf5ff;
border-radius: 5px;
}
.ChooseImg .selectActive .el-icon-tickets{
color: #409EFF;
}
.ChooseImg .selectActive{
color: #409EFF;
}
.ChooseImg .app-attachment-name {
color: #666666;
margin-top: 5px;
......
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