Commit 775d6b6e authored by 黄奎's avatar 黄奎
parents 678e7701 0a48f516
...@@ -2,42 +2,65 @@ ...@@ -2,42 +2,65 @@
<div class="navigation"> <div class="navigation">
<template v-if="NavIconIsShowAdd"> <template v-if="NavIconIsShowAdd">
<div class="head-title"> <div class="head-title">
导航图标列表 服务人员列表
<el-button @click="NavIconIsShowAdd=false" style="float:right;margin-top: -5px;" size="small" type="primary"> <el-button @click="NavIconIsShowAdd=false" style="float:right;margin-top: -5px;" size="small" type="primary">
添加导航图标 添加服务人员
</el-button> </el-button>
</div> </div>
<div class="content"> <div class="content">
<div> <div>
<div class="searchInput"> <div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容" <el-input style="display:inline-block;width:225px;height:30px" placeholder="服务人员姓名"
v-model="msg.NavIconName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()"> v-model="msg.Name" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input> </el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px" <span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span> @click="msg.pageIndex=1,getList()"> </span>
</div> </div>
<div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="电话"
v-model="msg.Telephone" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"></span>
</div>
<div style="display:inline-block;">
<el-button @click="operateShelves(1)" style="margin-left:10px;" size="mini">启用</el-button>
<el-button @click="operateShelves(2)" style="margin-left:10px;" size="mini">禁用</el-button>
</div>
</div> </div>
<el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0"> <el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0"
<el-table-column prop="NavIconId" label="编号" width="100"> @selection-change="tableSelect">
<el-table-column type="selection" width="55">
</el-table-column>
<el-table-column label="头像" width="100">
<template slot-scope="scope">
<img :src="scope.row.ServiceLogo" style="width:35px;height:35px;">
</template>
</el-table-column>
<el-table-column prop="Name" label="名称">
</el-table-column> </el-table-column>
<el-table-column prop="NavIconName" width="120" label="名称"> <el-table-column prop="StoreName" label="店铺名称">
</el-table-column> </el-table-column>
<el-table-column label="导航图标" width="80"> <el-table-column prop="OrderNum" label="预约次数">
</el-table-column>
<el-table-column prop="CreateDateStr" label="创建时间" width="180">
</el-table-column>
<el-table-column label="状态" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<img :src="scope.row.NavIconImg" style="width:35px;height:35px;"> <el-tag v-if="scope.row.ServiceStatus==1" type="success">启用中</el-tag>
<el-tag v-if="scope.row.ServiceStatus==2" type="warning">禁用中</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="NavIconUrl" label="导航链接"> <el-table-column prop="Telephone" label="电话" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="NavIconSort" label="排序" width="180"> <el-table-column prop="Major" label="职务" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="NavIconIsShowStr" label="是否显示" width="120"> <el-table-column prop="GenderStr" label="性别" width="180">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<img @click="EditNavIcon(scope.row)" src="../../assets/img/userman/edit.png" alt=""> <img @click="EditNavIcon(scope.row)" src="../../assets/img/userman/edit.png" alt="">
<img @click="RemmoveNavIcon(scope.row)" style="margin-left:10px;" src="../../assets/img/userman/del.png" <!-- <img style="margin-left:10px;" src="../../assets/img/userman/del.png" alt=""> -->
alt="">
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -52,7 +75,7 @@ ...@@ -52,7 +75,7 @@
style="margin:0 9px;color:#C0C4CC">/</span><span>导航图标编辑</span> style="margin:0 9px;color:#C0C4CC">/</span><span>导航图标编辑</span>
</div> </div>
<div class="content"> <div class="content">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="80px" style="padding:0 20px;"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px" style="padding:0 20px;">
<el-form-item label="头像"> <el-form-item label="头像">
<div> <div>
<el-tooltip class="item" effect="dark" content="建议尺寸:88*88" placement="top-start"> <el-tooltip class="item" effect="dark" content="建议尺寸:88*88" placement="top-start">
...@@ -60,46 +83,62 @@ ...@@ -60,46 +83,62 @@
</el-tooltip> </el-tooltip>
</div> </div>
<div class="navNavIconImg"> <div class="navNavIconImg">
<img v-if="addMsg.headImg" :src="addMsg.headImg" alt="" /> <img v-if="addMsg.ServiceLogo" :src="addMsg.ServiceLogo" alt="" />
<img v-else src="../../assets/img/default.png" alt="" /> <img v-else src="../../assets/img/default.png" alt="" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="名称" prop="name"> <el-form-item label="对应的类型">
<el-input v-model="addMsg.name" class="w400" size="small" placeholder="请输入名称" maxlength="20" /> <div @click="getUseType(1)" style="margin-right: 15px">
<el-radio :label="1" v-model="addMsg.ServiceType">分类</el-radio>
</div>
<div @click='getUseType(2)' style="margin-right: 15px">
<el-radio :label="2" v-model="msg.ServiceType">部分商品</el-radio>
</div>
<el-radio :label="3" v-model="msg.ServiceType" @change="getUseType2" style="margin-right: 15px">全部商品</el-radio>
</el-form-item>
<el-form-item label="名称" prop="Name">
<el-input v-model="addMsg.Name" class="w400" size="small" placeholder="请输入服务人员名称" maxlength="20" />
</el-form-item> </el-form-item>
<el-form-item label="性别"> <el-form-item label="性别">
<el-radio v-model="addMsg.sex" :label="1"></el-radio> <el-radio-group v-model="addMsg.Gender">
<el-radio v-model="addMsg.sex" :label="2"></el-radio> <el-radio :label="item.Name" v-for="(item,index) in genderList" :key="index">{{item.Name}}</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="标签"> <el-form-item label="标签">
<el-tag :key="tag" size="small" v-for="tag in addMsg.tags" closable :disable-transitions="false" <el-tag :key="tag" size="small" v-for="(tag,index) in addMsg.LableNameList" closable :disable-transitions="false"
@close="handleClose(tag)"> @close="handleClose(index)">
{{tag}} {{tag}}
</el-tag> </el-tag>
<!-- <el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" <el-input
size="small" @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm"> class="input-new-tag"
</el-input> --> v-if="inputVisible"
v-model="inputValue"
ref="saveTagInput"
size="small"
@keyup.enter.native="handleInputConfirm"
@blur="handleInputConfirm"
>
</el-input>
<el-button class="button-new-tag" size="small" @click="showInput">+ 标签</el-button> <el-button class="button-new-tag" size="small" @click="showInput">+ 标签</el-button>
</el-form-item> </el-form-item>
<el-form-item label="好评率"> <el-form-item label="虚拟预约数">
<el-input v-model="addMsg.Praise" class="w400" size="small" placeholder="请输入好评率" maxlength="20" /> <el-input v-model="addMsg.FictitiousReserveNum" class="w400" size="small" placeholder="请输入预约次数" maxlength="20" />
</el-form-item>
<el-form-item label="预约次数">
<el-input v-model="addMsg.appointment" class="w400" size="small" placeholder="请输入预约次数" maxlength="20" />
</el-form-item> </el-form-item>
<el-form-item label="电话"> <el-form-item label="电话">
<el-input v-model="addMsg.tel" class="w400" size="small" placeholder="请输入电话" maxlength="20" /> <el-input v-model="addMsg.Telephone" class="w400" size="small" placeholder="请输入电话" maxlength="20" />
</el-form-item> </el-form-item>
<el-form-item label="关联产品"> <el-form-item label="状态">
<el-input v-model="addMsg.AssociatedProducts" class="w400" size="small" placeholder="请输入关联产品" <el-switch
maxlength="20" /> v-model="addMsg.ServiceStatus"
active-color="#409EFF"
:active-value="1"
:inactive-value="2"
active-text="启用"
inactive-text="禁用">
</el-switch>
</el-form-item> </el-form-item>
<el-form-item label="职务"> <el-form-item label="职务">
<el-input v-model="addMsg.position" class="w400" size="small" placeholder="职务" maxlength="20" /> <el-input v-model="addMsg.Major" class="w400" size="small" placeholder="职务" maxlength="20" />
</el-form-item>
<el-form-item label="关联门店">
<el-input v-model="addMsg.AssociatedStores" class="w400" size="small" placeholder="请输入关联门店"
maxlength="20" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -142,46 +181,38 @@ ...@@ -142,46 +181,38 @@
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
NavIconName: "", Name:'', //服务人员姓名
MallBaseId: 0, ID:0, //编号
NavIconIsShow: -1 Telephone:'' //电话
},
addMsg:{
LableNameList:[], // 标签
StoreId:'', // 店铺id
Gender:'', //性别
ServiceType:'', //对应的类型
ProductList:[], //商品信息
ID:0, //编号
Name:'', //服务人员名称
ServiceLogo:'', //头像、
Major:'', //职务
ServiceStatus:1, // 启用/禁用 状态1启用 2禁用
Telephone:'', //电话
FictitiousReserveNum:'' //虚拟预约数
}, },
GoodsIds: [], //列表选中的商品编号
total: 0, total: 0,
NavIconIsShowAdd: true, NavIconIsShowAdd: true,
addMsg: { addMsg: {
headImg: '', //头像 pageIndex: 1,
name: '', //名称 pageSize: 10,
sex: 0, //性别
tags: [], //标签
Praise: 0, //好评率
appointment: 0, //预约次数
tel: '', //电话
AssociatedProducts: '', //关联产品
position: '', //职务
AssociatedStores: '', //关联门店
},
rules: {
NavIconName: [{
required: true,
message: "请输入导航名称",
trigger: "blur"
}],
NavIconSort: [{
required: true,
message: "请输入导航排序",
trigger: "blur"
}],
NavIconImg: [{
validator: validataNavIconImg,
trigger: "blur",
required: true
}],
NavIconUrl: [{
required: true,
message: "请选择导航链接",
trigger: "blur"
}]
}, },
genderList:[], //性别枚举
inputValue:'', //新增标签输入框值
inputVisible: false, //切换新增标签输入框
rules:{
}
}; };
}, },
components: { components: {
...@@ -192,14 +223,85 @@ ...@@ -192,14 +223,85 @@
}, },
methods: { methods: {
//删除标签
handleClose() {
},
//新增标签 //新增标签
showInput() { showInput() {
this.inputVisible = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm() {
if (this.inputValue) {
this.addMsg.LableNameList.push(this.inputValue);
}
this.inputVisible = false;
this.inputValue = '';
},
//表格选中
tableSelect(val) {
this.GoodsIds = val;
console.log(val,'val');
},
//操作上下架
operateShelves(type){
if (this.GoodsIds.length == 0) {
this.Error("请先勾选要设置的服务人员!");
return;
}
let idList = [];
this.GoodsIds.forEach(item => {
idList.push(item.ID)
})
let IdsList = idList.join(',');
let msg = {
Ids: IdsList,
ServiceStatus: type
}
let str = "";
if (type == 1) {
str = "批量启用,是否继续";
}
if (type == 2) {
str = "批量禁用,是否继续";
}
let that = this;
that.Confirm(str, function () {
that.apipost('/api/Reserve/EnableServicePersonalInfo', msg,
res => {
if (res.data.resultCode === 1) {
that.getList();
that.Success(res.data.message);
} else {
that.Error(res.data.message);
}
},
null
);
});
},
//获取性别
getMale(){
this.apipost("/api/Reserve/GetGenderEnumList", {}, res => {
if (res.data.resultCode == 1) {
console.log(res,'数据');
this.genderList = res.data.data;
} else {
this.Error(res.data.message);
}
})
},
//删除标签
handleClose(tag) {
this.addMsg.LableNameList.splice(index, 1);
},
//操作对应商品类型
getUseType(){
}, },
getUseType2(){
},
getMenu() { getMenu() {
//调用子组件方法 //调用子组件方法
var obj = this.$refs.chooseMenu.getChooseMenu(); var obj = this.$refs.chooseMenu.getChooseMenu();
...@@ -211,18 +313,21 @@ ...@@ -211,18 +313,21 @@
this.getList(); this.getList();
}, },
getList() { getList() {
this.apipost("/api/Tenant/GetMiniProgrameNaviconPage", this.msg, res => { this.loading=true;
this.apipost("/api/Reserve/GetServicePersonalPageList", this.msg, res => {
this.loading=false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log(res,'数据');
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.total = res.data.data.count; this.total = res.data.data.count;
} else { } else {
this.Info(res.data.message); this.Error(res.data.message);
} }
}) })
}, },
//选择图片 //选择图片
SelectId(msg) { SelectId(msg) {
this.addMsg.NavIconImg = this.getIconLink(msg.url); this.addMsg.ServiceLogo = this.getIconLink(msg.url);
this.choicImg = false; this.choicImg = false;
}, },
submitform(addMsg) { submitform(addMsg) {
...@@ -268,6 +373,7 @@ ...@@ -268,6 +373,7 @@
}, },
mounted() { mounted() {
this.getList(); this.getList();
this.getMale();
} }
}; };
......
...@@ -1234,7 +1234,7 @@ ...@@ -1234,7 +1234,7 @@
companyCommission: 0, companyCommission: 0,
FXlevelList: [], FXlevelList: [],
giveDate: false, giveDate: false,
Stores: '', Stores: [],
StoreList: [], //门店下拉数据 StoreList: [], //门店下拉数据
}; };
}, },
...@@ -1770,9 +1770,8 @@ ...@@ -1770,9 +1770,8 @@
this.addMsg.IsCustomSpecification = 2; this.addMsg.IsCustomSpecification = 2;
} }
if (this.Stores.length > 0) { if (this.Stores.length > 0) {
this.addMsg.StoresIds = JSON.stringify(this.Stores); this.addMsg.StoresIds = this.Stores.join(",");
} }
if (this.addMsg.SeparateDistributionType == 1) { if (this.addMsg.SeparateDistributionType == 1) {
this.disList1 = [{ this.disList1 = [{
SpecificationSort: "", SpecificationSort: "",
...@@ -2051,7 +2050,6 @@ ...@@ -2051,7 +2050,6 @@
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log("res.data.data", JSON.parse(JSON.stringify(res.data.data)));
this.addMsg = res.data.data; this.addMsg = res.data.data;
if (!this.$route.query.GoodsId) { if (!this.$route.query.GoodsId) {
this.addMsg.Id = 0 this.addMsg.Id = 0
...@@ -2081,8 +2079,8 @@ ...@@ -2081,8 +2079,8 @@
this.GradeCommissionList = this.addMsg.DistributionCommissionTreeList[0].GradeCommissionList; this.GradeCommissionList = this.addMsg.DistributionCommissionTreeList[0].GradeCommissionList;
} }
} }
if (this.addMsg.StoresIds) { if (this.addMsg.StoresList) {
this.Stores = JSON.parse(this.addMsg.StoresIds); this.Stores = this.addMsg.StoresList;
} }
this.thisType = 1; this.thisType = 1;
this.disList1 = []; this.disList1 = [];
...@@ -2130,6 +2128,7 @@ ...@@ -2130,6 +2128,7 @@
ico: "" ico: ""
} }
} }
console.log(this.Stores,'Stores');
this.getSuggestPrice(); this.getSuggestPrice();
this.getFXDGradeList2(); this.getFXDGradeList2();
this.getTree(); this.getTree();
......
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