|
@@ -26,8 +26,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="change">
|
|
<div class="change">
|
|
|
- <el-button @click="addMember" v-if="userLevel != 4" type="primary">新增会员</el-button>
|
|
|
|
|
- <el-button @click="delList" v-if="userLevel != 4">删除会员</el-button>
|
|
|
|
|
|
|
+ <el-button @click="addMember" v-if="userLevel != 4" type="primary">新增跨店会员</el-button>
|
|
|
|
|
+ <el-button @click="delList" v-if="userLevel != 4">删除跨店会员</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="table">
|
|
<div class="table">
|
|
|
<el-table
|
|
<el-table
|
|
@@ -114,7 +114,7 @@
|
|
|
<div>
|
|
<div>
|
|
|
|
|
|
|
|
<el-form ref="form" :model="form" label-width="80px">
|
|
<el-form ref="form" :model="form" label-width="80px">
|
|
|
- <el-form-item label="会员账号" v-if="form.btnType == 0">
|
|
|
|
|
|
|
+ <el-form-item label="会员账号">
|
|
|
<el-select v-model="form.userId " filterable placeholder="请选择会员账号">
|
|
<el-select v-model="form.userId " filterable placeholder="请选择会员账号">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in form.vipList"
|
|
v-for="item in form.vipList"
|
|
@@ -124,7 +124,7 @@
|
|
|
></el-option>
|
|
></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="商家分组" v-if="form.btnType == 0">
|
|
|
|
|
|
|
+ <el-form-item label="商家分组">
|
|
|
<el-select v-model="form.groupId " filterable placeholder="请选择商家分组">
|
|
<el-select v-model="form.groupId " filterable placeholder="请选择商家分组">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in form.groupList"
|
|
v-for="item in form.groupList"
|
|
@@ -171,12 +171,12 @@
|
|
|
qiniuaddr: 'qjzpcd34v.hb-bkt.clouddn.com',
|
|
qiniuaddr: 'qjzpcd34v.hb-bkt.clouddn.com',
|
|
|
dialogVisible: false,//其他dialog
|
|
dialogVisible: false,//其他dialog
|
|
|
TakeVisible: false,//take dialog
|
|
TakeVisible: false,//take dialog
|
|
|
- dialogMemberVisible: false,//新增会员dialog
|
|
|
|
|
|
|
+ dialogMemberVisible: false,//新增跨店会员dialog
|
|
|
dialogLesson: false,//课时调整
|
|
dialogLesson: false,//课时调整
|
|
|
dialogGift: false,//赠送课时调整
|
|
dialogGift: false,//赠送课时调整
|
|
|
dialogExpTime: false,//有效期调整
|
|
dialogExpTime: false,//有效期调整
|
|
|
dialogLessonTable: false,//会员课程
|
|
dialogLessonTable: false,//会员课程
|
|
|
- dialogTitle: '新增会员',
|
|
|
|
|
|
|
+ dialogTitle: '新增跨店会员',
|
|
|
dialogValue: [],
|
|
dialogValue: [],
|
|
|
Takevalue: 0,
|
|
Takevalue: 0,
|
|
|
Takeoptions: [],
|
|
Takeoptions: [],
|
|
@@ -223,6 +223,7 @@
|
|
|
phone: '',
|
|
phone: '',
|
|
|
name: '',
|
|
name: '',
|
|
|
userCode: '',
|
|
userCode: '',
|
|
|
|
|
+ groupId: '',
|
|
|
shopId: '',
|
|
shopId: '',
|
|
|
Id: '',
|
|
Id: '',
|
|
|
userId: '',
|
|
userId: '',
|
|
@@ -254,9 +255,6 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- // 加载课程选项
|
|
|
|
|
- this.getClassVipuserQueryByAdmin();
|
|
|
|
|
- this.getShopGroupQuery();
|
|
|
|
|
// 读取列表
|
|
// 读取列表
|
|
|
this.getTableQuery();
|
|
this.getTableQuery();
|
|
|
},
|
|
},
|
|
@@ -292,201 +290,9 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // 关联手机号跳转
|
|
|
|
|
- goRelevance(row) {
|
|
|
|
|
- this.$router.push({path: '/relevancePhone', query: {userId: row.UserInfo.Id}});
|
|
|
|
|
- },
|
|
|
|
|
- // 上传文件到七牛云
|
|
|
|
|
- upqiniu(req) {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- const config = {
|
|
|
|
|
- headers: {'Content-Type': 'multipart/form-data'}
|
|
|
|
|
- };
|
|
|
|
|
- let filetype = '';
|
|
|
|
|
- if (req.file.type === 'image/png') {
|
|
|
|
|
- filetype = 'png'
|
|
|
|
|
- } else {
|
|
|
|
|
- filetype = 'jpg'
|
|
|
|
|
- }
|
|
|
|
|
- // 重命名要上传的文件
|
|
|
|
|
- const keyname = 'GoAllOut' + new Date().valueOf() + Math.floor(Math.random() * 100) + '.' + filetype;
|
|
|
|
|
- // 从后端获取上传凭证token
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- this.axios.post(headapi + 'v1/QiNiu/GetSimpleQiNiuToken', postdata).then(res => {
|
|
|
|
|
- const formdata = new FormData();
|
|
|
|
|
- formdata.append('file', req.file);
|
|
|
|
|
- formdata.append('token', res.data.QiNinToken);
|
|
|
|
|
- formdata.append('key', keyname);
|
|
|
|
|
- // 获取到凭证之后再将文件上传到七牛云空间
|
|
|
|
|
- this.axios.post(this.domain, formdata, config).then(res => {
|
|
|
|
|
- this.imageUrl = 'http://' + this.qiniuaddr + '/' + res.data.key;
|
|
|
|
|
- this.form.head = 'http://' + this.qiniuaddr + '/' + keyname;
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 验证文件合法性
|
|
|
|
|
- beforeUpload(file) {
|
|
|
|
|
- const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
|
|
|
|
|
- const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
|
|
- if (!isJPG) {
|
|
|
|
|
- this.$message.error('上传头像图片只能是 JPG 格式!')
|
|
|
|
|
- }
|
|
|
|
|
- if (!isLt2M) {
|
|
|
|
|
- this.$message.error('上传头像图片大小不能超过 2MB!')
|
|
|
|
|
- }
|
|
|
|
|
- return isJPG && isLt2M
|
|
|
|
|
- },
|
|
|
|
|
- // 打开take绑定和拉取take数据
|
|
|
|
|
- addTake(row) {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- userId: row.UserInfo.Id,
|
|
|
|
|
- };
|
|
|
|
|
- this.TakeHid = row.UserInfo.HId;
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- QueryTakeCustomerByName(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- if (json.Rs != '') {
|
|
|
|
|
- that.Takeoptions = json.Rs;
|
|
|
|
|
- that.Takevalue = json.Rs[0].Id;
|
|
|
|
|
- // 有值才能打开
|
|
|
|
|
- this.TakeVisible = true;
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error('当前用户没有可用的Take账号');
|
|
|
|
|
- this.TakeVisible = false;
|
|
|
|
|
- console.log('null');
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error(json.Memo);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 绑定take
|
|
|
|
|
- confirmTake() {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- hId: this.TakeHid,
|
|
|
|
|
- customerId: this.Takevalue,
|
|
|
|
|
- memo: '后台管理手动绑定',
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- BindTakeCustomer(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: 'Take绑定成功!',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- this.TakeVisible = false;
|
|
|
|
|
- // 读取列表
|
|
|
|
|
- this.getTableQuery();
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error(json.Memo);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
clickChange(item) {
|
|
clickChange(item) {
|
|
|
this.tableRadio = item
|
|
this.tableRadio = item
|
|
|
},
|
|
},
|
|
|
- // 编辑
|
|
|
|
|
- editMember(row) {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- this.clearForm();
|
|
|
|
|
- this.form.phone = row.UserInfo.Phone;
|
|
|
|
|
- this.form.name = row.UserInfo.Name;
|
|
|
|
|
- this.form.memo = row.UserInfo.Memo;
|
|
|
|
|
- this.imageUrl = row.UserInfo.Head;
|
|
|
|
|
- this.form.height = row.UserInfo.Height;
|
|
|
|
|
- this.form.weight = parseInt(row.UserInfo.Weight) / 10;
|
|
|
|
|
- // this.form.staticHr = row.UserInfo.StaticHr;
|
|
|
|
|
- this.form.sex = row.UserInfo.Sex;
|
|
|
|
|
- this.form.birthday = row.UserInfo.Birthday;
|
|
|
|
|
- this.form.ubId = row.UserInfo.UbId;
|
|
|
|
|
- this.form.btnType = 1;
|
|
|
|
|
- this.form.shopId = row.UserInfo.ShopId;
|
|
|
|
|
- this.form.Id = row.UserInfo.Id;
|
|
|
|
|
- this.dialogMemberVisible = true;
|
|
|
|
|
- this.dialogTitle = '编辑会员'
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- // 禁用
|
|
|
|
|
- pauseRow(row) {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- this.$confirm('是否禁用用户' + row.UserInfo.Name + '?', '禁用操作', {
|
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- userId: row.UserInfo.Id,
|
|
|
|
|
- status: 8,//状态 8:禁用 1:启用 9:删除
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- VipUserStatusEdit(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: row.UserInfo.Name + '禁用成功!',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- // table 重载
|
|
|
|
|
- that.getTableQuery();
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error(json.Memo);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'info',
|
|
|
|
|
- message: '已取消禁用'
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- // 启用
|
|
|
|
|
- runRow(row) {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- this.$confirm('是否启用用户' + row.UserInfo.Name + '?', '启用操作', {
|
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- userId: row.UserInfo.Id,
|
|
|
|
|
- status: 1,//状态 8:禁用 1:启用 9:删除
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- VipUserStatusEdit(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: row.UserInfo.Name + '启用成功!',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- // table 重载
|
|
|
|
|
- that.getTableQuery();
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error(json.Memo);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'info',
|
|
|
|
|
- message: '已取消启用'
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
// 关闭所有
|
|
// 关闭所有
|
|
|
allDialogClose() {
|
|
allDialogClose() {
|
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
@@ -495,82 +301,7 @@
|
|
|
this.dialogExpTime = false;
|
|
this.dialogExpTime = false;
|
|
|
this.dialogLessonTable = false;
|
|
this.dialogLessonTable = false;
|
|
|
},
|
|
},
|
|
|
- // 有效期调整
|
|
|
|
|
- ExpTimeChange() {
|
|
|
|
|
- // 仅针对年费用户,使用日期格式
|
|
|
|
|
- this.allDialogClose();
|
|
|
|
|
- if (this.tableRadio.length == 0) {
|
|
|
|
|
- this.$message.error("请先选中一条记录");
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- let row = this.tableRadio;
|
|
|
|
|
- if (parseInt(row.UserInfo.VipType) == 2) {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: '错了哦,充值会员不能调整有效期',
|
|
|
|
|
- type: 'error'
|
|
|
|
|
- });
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- this.form.rowName = row.UserInfo.Name;
|
|
|
|
|
- this.form.userId = row.UserInfo.Id;
|
|
|
|
|
- this.form.expTime = row.UserInfo.ExpTime
|
|
|
|
|
- this.dialogVisible = true;
|
|
|
|
|
- this.dialogExpTime = true;
|
|
|
|
|
- },
|
|
|
|
|
- // 课时调整
|
|
|
|
|
- lessonChange() {
|
|
|
|
|
- this.allDialogClose();
|
|
|
|
|
- if (this.tableRadio.length == 0) {
|
|
|
|
|
- this.$message.error("请先选中一条记录");
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- let row = this.tableRadio;
|
|
|
|
|
- this.form.normalhour = row.UserInfo.RemainNormalhour;
|
|
|
|
|
- this.form.newnormalhour = 0;
|
|
|
|
|
- this.form.rowName = row.UserInfo.Name;
|
|
|
|
|
- this.form.userId = row.UserInfo.Id;
|
|
|
|
|
- this.dialogVisible = true;
|
|
|
|
|
- this.dialogLesson = true;
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- // 赠送调整
|
|
|
|
|
- giftChange() {
|
|
|
|
|
- this.allDialogClose();
|
|
|
|
|
- if (this.tableRadio.length == 0) {
|
|
|
|
|
- this.$message.error("请先选中一条记录");
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- let row = this.tableRadio;
|
|
|
|
|
- this.form.gifthour = row.UserInfo.RemainGifthour;
|
|
|
|
|
- this.form.newgifthour = 0;
|
|
|
|
|
- this.form.rowName = row.UserInfo.Name;
|
|
|
|
|
- this.form.userId = row.UserInfo.Id;
|
|
|
|
|
- this.dialogVisible = true;
|
|
|
|
|
- this.dialogGift = true;
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- // 增删会员课程
|
|
|
|
|
- lessonStudenChange() {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- this.allDialogClose();
|
|
|
|
|
- // 重载课程列表选项
|
|
|
|
|
- if (this.tableRadio.length == 0) {
|
|
|
|
|
- that.$message.error("请先选中一条记录");
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- let row = this.tableRadio;
|
|
|
|
|
- this.form.rowName = row.UserInfo.Name;
|
|
|
|
|
- this.form.userId = row.UserInfo.Id;
|
|
|
|
|
- if (row.ClassInfo) {
|
|
|
|
|
- row.ClassInfo.map(function (item) {
|
|
|
|
|
- that.form.dialogValue.push(item.ClassId)
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- this.dialogVisible = true;
|
|
|
|
|
- this.dialogLessonTable = true;
|
|
|
|
|
- },
|
|
|
|
|
- // 确认提交新增会员
|
|
|
|
|
|
|
+ // 确认提交新增跨店会员
|
|
|
confirmMember() {
|
|
confirmMember() {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
// checkNum
|
|
// checkNum
|
|
@@ -608,125 +339,16 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // 确认提交课时
|
|
|
|
|
- confirmLesson() {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- // checkNum
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- userId: that.form.userId,
|
|
|
|
|
- chgHour: that.form.newnormalhour,
|
|
|
|
|
- chgType: 1,//课时类型 1:普通课时 2:赠送课时
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- VipUserHourEdit(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- // 关闭弹窗
|
|
|
|
|
- that.dialogVisible = false;
|
|
|
|
|
- // 重载列表
|
|
|
|
|
- that.getTableQuery();
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: '课时调整成功!',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error(json.Memo);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 确认提交赠送
|
|
|
|
|
- confirmGift() {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- userId: that.form.userId,
|
|
|
|
|
- chgHour: that.form.newgifthour,
|
|
|
|
|
- chgType: 2,//课时类型 1:普通课时 2:赠送课时
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- VipUserHourEdit(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- // 关闭弹窗
|
|
|
|
|
- that.dialogVisible = false;
|
|
|
|
|
- // 重载列表
|
|
|
|
|
- that.getTableQuery();
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: '赠送课时调整成功!',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error(json.Memo);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 确认提交有效期
|
|
|
|
|
- confirmExpTime() {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- // checkNum
|
|
|
|
|
-
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- userId: that.form.userId,
|
|
|
|
|
- expTime: nonTfmtDate(that.form.expTime, 16),
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- VipUserExpEdit(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- // 关闭弹窗
|
|
|
|
|
- that.dialogVisible = false;
|
|
|
|
|
- // 重载列表
|
|
|
|
|
- that.getTableQuery();
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: '赠送课时调整成功!',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error(json.Memo);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 确认提交会员课程
|
|
|
|
|
- confirmLessonTable() {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- // checkNum
|
|
|
|
|
- let classList = that.form.dialogValue ? that.form.dialogValue.toString() : '';
|
|
|
|
|
-
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- userId: that.form.userId,
|
|
|
|
|
- classList: classList,
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- VipUserClassEdit(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- // 关闭弹窗
|
|
|
|
|
- that.dialogVisible = false;
|
|
|
|
|
- // 重载列表
|
|
|
|
|
- that.getTableQuery();
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: '会员课程调整成功!',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error(json.Memo);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 新增会员
|
|
|
|
|
|
|
+ // 新增跨店会员
|
|
|
addMember() {
|
|
addMember() {
|
|
|
- this.clearForm();
|
|
|
|
|
|
|
+ this.getClassVipuserQueryByAdmin();
|
|
|
|
|
+ this.getShopGroupQuery();
|
|
|
this.dialogMemberVisible = true;
|
|
this.dialogMemberVisible = true;
|
|
|
this.btnType = 0;
|
|
this.btnType = 0;
|
|
|
this.form.btnType = 0;
|
|
this.form.btnType = 0;
|
|
|
- this.dialogTitle = '新增会员'
|
|
|
|
|
|
|
+ this.form.userId = '';
|
|
|
|
|
+ this.form.groupId = '';
|
|
|
|
|
+ this.dialogTitle = '新增跨店会员'
|
|
|
},
|
|
},
|
|
|
// 删除
|
|
// 删除
|
|
|
delList() {
|
|
delList() {
|
|
@@ -779,33 +401,15 @@
|
|
|
that.serachBtnStatus = true;
|
|
that.serachBtnStatus = true;
|
|
|
that.getTableQuery();
|
|
that.getTableQuery();
|
|
|
that.$message.success('查询完毕');
|
|
that.$message.success('查询完毕');
|
|
|
- let totalTime = 2
|
|
|
|
|
|
|
+ let totalTime = 2;
|
|
|
let clock = window.setInterval(() => {
|
|
let clock = window.setInterval(() => {
|
|
|
- totalTime--
|
|
|
|
|
|
|
+ totalTime--;
|
|
|
if (totalTime < 0) {
|
|
if (totalTime < 0) {
|
|
|
totalTime = 2;
|
|
totalTime = 2;
|
|
|
that.serachBtnStatus = false;
|
|
that.serachBtnStatus = false;
|
|
|
}
|
|
}
|
|
|
}, 1000)
|
|
}, 1000)
|
|
|
},
|
|
},
|
|
|
- clearForm() {
|
|
|
|
|
- // clear
|
|
|
|
|
- this.form.name = '';
|
|
|
|
|
- this.form.head = '';
|
|
|
|
|
- this.imageUrl = '';
|
|
|
|
|
- this.form.phone = '';
|
|
|
|
|
- this.form.memo = '';
|
|
|
|
|
- this.form.normalhour = 0;
|
|
|
|
|
- this.form.gifthour = 0;
|
|
|
|
|
- this.form.height = '';
|
|
|
|
|
- this.form.weight = '';
|
|
|
|
|
- this.form.staticHr = 0;
|
|
|
|
|
- this.form.sex = 1;
|
|
|
|
|
- this.form.birthday = '';
|
|
|
|
|
- this.form.userCode = '';
|
|
|
|
|
- this.form.shopId = '';
|
|
|
|
|
- this.form.classlist = [];
|
|
|
|
|
- },
|
|
|
|
|
// 页面数据查询
|
|
// 页面数据查询
|
|
|
getTableQuery() {
|
|
getTableQuery() {
|
|
|
let that = this;
|
|
let that = this;
|
|
@@ -891,9 +495,6 @@
|
|
|
watch: {
|
|
watch: {
|
|
|
$route(to) {
|
|
$route(to) {
|
|
|
if (to.name == 'AcrossVip') {
|
|
if (to.name == 'AcrossVip') {
|
|
|
- // 加载课程选项
|
|
|
|
|
- this.getClassVipuserQueryByAdmin();
|
|
|
|
|
- this.getShopGroupQuery();
|
|
|
|
|
// 读取列表
|
|
// 读取列表
|
|
|
this.getTableQuery();
|
|
this.getTableQuery();
|
|
|
}
|
|
}
|