|
@@ -125,9 +125,9 @@
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="商家分组" v-if="form.btnType == 0">
|
|
<el-form-item label="商家分组" v-if="form.btnType == 0">
|
|
|
- <el-select v-model="form.vipType" filterable placeholder="请选择商家分组">
|
|
|
|
|
|
|
+ <el-select v-model="form.groupId " filterable placeholder="请选择商家分组">
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in memberTypes"
|
|
|
|
|
|
|
+ v-for="item in form.groupList"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
@@ -139,8 +139,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="dialogFooter">
|
|
<div class="dialogFooter">
|
|
|
<el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
|
|
<el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
|
|
|
- <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
|
|
|
|
|
- </el-button>
|
|
|
|
|
<el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
|
|
<el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -152,17 +150,15 @@
|
|
|
import {
|
|
import {
|
|
|
AcrossVipUserQuery,
|
|
AcrossVipUserQuery,
|
|
|
VipUserSimpleQueryByAdmin,
|
|
VipUserSimpleQueryByAdmin,
|
|
|
- ClassListQuery,
|
|
|
|
|
- VipUserAdd,
|
|
|
|
|
|
|
+ ShopGroupQuery,
|
|
|
|
|
+ AcrossVipUserAdd,
|
|
|
|
|
+ AcrossVipUserDel,
|
|
|
VipUserStatusEdit,
|
|
VipUserStatusEdit,
|
|
|
- VipUserEdit,
|
|
|
|
|
VipUserHourEdit,
|
|
VipUserHourEdit,
|
|
|
VipUserExpEdit,
|
|
VipUserExpEdit,
|
|
|
VipUserClassEdit,
|
|
VipUserClassEdit,
|
|
|
QueryTakeCustomerByName,
|
|
QueryTakeCustomerByName,
|
|
|
BindTakeCustomer,
|
|
BindTakeCustomer,
|
|
|
- testTable,
|
|
|
|
|
- testSelect
|
|
|
|
|
} from "../api/getApiRes";
|
|
} from "../api/getApiRes";
|
|
|
|
|
|
|
|
let qs = require('qs');
|
|
let qs = require('qs');
|
|
@@ -245,6 +241,7 @@
|
|
|
memo: '',
|
|
memo: '',
|
|
|
expTime: '',
|
|
expTime: '',
|
|
|
vipList: [],
|
|
vipList: [],
|
|
|
|
|
+ groupList: [],
|
|
|
classlist: [],
|
|
classlist: [],
|
|
|
dialogdata: [],//穿梭待选
|
|
dialogdata: [],//穿梭待选
|
|
|
dialogValue: [],//穿梭已选
|
|
dialogValue: [],//穿梭已选
|
|
@@ -259,6 +256,7 @@
|
|
|
mounted() {
|
|
mounted() {
|
|
|
// 加载课程选项
|
|
// 加载课程选项
|
|
|
this.getClassVipuserQueryByAdmin();
|
|
this.getClassVipuserQueryByAdmin();
|
|
|
|
|
+ this.getShopGroupQuery();
|
|
|
// 读取列表
|
|
// 读取列表
|
|
|
this.getTableQuery();
|
|
this.getTableQuery();
|
|
|
},
|
|
},
|
|
@@ -273,9 +271,22 @@
|
|
|
VipUserSimpleQueryByAdmin(postdata).then(res => {
|
|
VipUserSimpleQueryByAdmin(postdata).then(res => {
|
|
|
let json = res;
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
if (json.Code == 0) {
|
|
|
- console.log(json.Rs);
|
|
|
|
|
that.form.vipList = turnResToOptionBySimViper(json.Rs);
|
|
that.form.vipList = turnResToOptionBySimViper(json.Rs);
|
|
|
- console.log(that.form.vipList);
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$message.error(json.Memo);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getShopGroupQuery() {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ let param = {
|
|
|
|
|
+ token: localStorage.token,
|
|
|
|
|
+ };
|
|
|
|
|
+ let postdata = qs.stringify(param);
|
|
|
|
|
+ ShopGroupQuery(postdata).then(res => {
|
|
|
|
|
+ let json = res;
|
|
|
|
|
+ if (json.Code == 0) {
|
|
|
|
|
+ that.form.groupList = turnResToOptionByGroup(json.Rs);
|
|
|
} else {
|
|
} else {
|
|
|
that.$message.error(json.Memo);
|
|
that.$message.error(json.Memo);
|
|
|
}
|
|
}
|
|
@@ -563,146 +574,24 @@
|
|
|
confirmMember() {
|
|
confirmMember() {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
// checkNum
|
|
// checkNum
|
|
|
- if (!that.form.phone) {
|
|
|
|
|
- this.$message.error('错了哦,手机号不能为空');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (!globalCheckPhone(that.form.phone)) {
|
|
|
|
|
- this.$message.error('错了哦,手机号格式不正确');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (!that.form.name) {
|
|
|
|
|
- this.$message.error('错了哦,会员名不能为空');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (that.form.name.length > 8) {
|
|
|
|
|
- this.$message.error('错了哦,会员名字数超过8个字');
|
|
|
|
|
|
|
+ if (!that.form.userId) {
|
|
|
|
|
+ this.$message.error('错了哦,会员不能为空');
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- if (that.form.memo) {
|
|
|
|
|
- if (that.form.memo.length > 200) {
|
|
|
|
|
- this.$message.error('错了哦,备注字数超过200个字');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- if (!that.form.height) {
|
|
|
|
|
- this.$message.error('错了哦,身高不能为空');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (!that.form.weight) {
|
|
|
|
|
- this.$message.error('错了哦,体重不能为空');
|
|
|
|
|
|
|
+ if (!that.form.groupId) {
|
|
|
|
|
+ this.$message.error('错了哦,商家分组不能为空');
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- // if (!that.form.staticHr) {
|
|
|
|
|
- // this.$message.error('错了哦,静态心率不能为空');
|
|
|
|
|
- // return false
|
|
|
|
|
- // }
|
|
|
|
|
- if (!that.form.birthday) {
|
|
|
|
|
- this.$message.error('错了哦,出生年份不能为空');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 课程添加使用字符串形式
|
|
|
|
|
- let curClasslist = '';
|
|
|
|
|
- if (that.form.classlist) {
|
|
|
|
|
- curClasslist = that.form.classlist.toString();
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
let param = {
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
token: localStorage.token,
|
|
|
shopId: localStorage.shopId,
|
|
shopId: localStorage.shopId,
|
|
|
- phone: that.form.phone,
|
|
|
|
|
- name: that.form.name,
|
|
|
|
|
- vipType: that.form.vipType,
|
|
|
|
|
- normalhour: that.form.normalhour,
|
|
|
|
|
- gifthour: that.form.gifthour,
|
|
|
|
|
- classlist: curClasslist,
|
|
|
|
|
- memo: that.form.memo,
|
|
|
|
|
- height: that.form.height,
|
|
|
|
|
- weight: that.form.weight,
|
|
|
|
|
- // staticHr: that.form.staticHr,
|
|
|
|
|
- sex: that.form.sex,
|
|
|
|
|
- head: that.form.head,
|
|
|
|
|
- birthday: nonTfmtDatetoLength(that.form.birthday, 10),
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- VipUserAdd(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- // 关闭弹窗
|
|
|
|
|
- that.dialogMemberVisible = false;
|
|
|
|
|
- // 重载列表
|
|
|
|
|
- that.getTableQuery();
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: '会员添加成功!',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message.error(json.Memo);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- confirmEditMember() {
|
|
|
|
|
- let that = this;
|
|
|
|
|
- // checkNum
|
|
|
|
|
- if (!that.form.phone) {
|
|
|
|
|
- this.$message.error('错了哦,手机号不能为空');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (!globalCheckPhone(that.form.phone)) {
|
|
|
|
|
- this.$message.error('错了哦,手机号格式不正确');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (!that.form.name) {
|
|
|
|
|
- this.$message.error('错了哦,会员名不能为空');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (that.form.name.length > 8) {
|
|
|
|
|
- this.$message.error('错了哦,会员名字数超过8个字');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (that.form.memo) {
|
|
|
|
|
- if (that.form.memo.length > 200) {
|
|
|
|
|
- this.$message.error('错了哦,备注字数超过200个字');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!that.form.height) {
|
|
|
|
|
- this.$message.error('错了哦,身高不能为空');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- if (!that.form.weight) {
|
|
|
|
|
- this.$message.error('错了哦,体重不能为空');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- // if (!that.form.staticHr) {
|
|
|
|
|
- // this.$message.error('错了哦,静态心率不能为空');
|
|
|
|
|
- // return false
|
|
|
|
|
- // }
|
|
|
|
|
- if (!that.form.birthday) {
|
|
|
|
|
- this.$message.error('错了哦,出生年份不能为空');
|
|
|
|
|
- return false
|
|
|
|
|
- }
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- userId: that.form.Id,
|
|
|
|
|
- phone: that.form.phone,
|
|
|
|
|
- name: that.form.name,
|
|
|
|
|
- memo: that.form.memo,
|
|
|
|
|
- head: that.form.head,
|
|
|
|
|
- height: that.form.height,
|
|
|
|
|
- weight: that.form.weight,
|
|
|
|
|
- // staticHr: that.form.staticHr,
|
|
|
|
|
- sex: that.form.sex,
|
|
|
|
|
- birthday: nonTfmtDatetoLength(that.form.birthday, 10),
|
|
|
|
|
- ubId: that.form.ubId
|
|
|
|
|
|
|
+ userId: that.form.userId,
|
|
|
|
|
+ groupId: that.form.groupId,
|
|
|
};
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
let postdata = qs.stringify(param);
|
|
|
- console.log(param);
|
|
|
|
|
- VipUserEdit(postdata).then(res => {
|
|
|
|
|
|
|
+ AcrossVipUserAdd(postdata).then(res => {
|
|
|
let json = res;
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
if (json.Code == 0) {
|
|
|
// 关闭弹窗
|
|
// 关闭弹窗
|
|
@@ -711,7 +600,7 @@
|
|
|
that.getTableQuery();
|
|
that.getTableQuery();
|
|
|
that.$message({
|
|
that.$message({
|
|
|
showClose: true,
|
|
showClose: true,
|
|
|
- message: '会员信息编辑成功!',
|
|
|
|
|
|
|
+ message: '跨店会员添加成功!',
|
|
|
type: 'success'
|
|
type: 'success'
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
@@ -846,26 +735,26 @@
|
|
|
that.$message.error("请先选中一条记录");
|
|
that.$message.error("请先选中一条记录");
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- let detectorid = this.tableRadio.UserInfo.Id;
|
|
|
|
|
|
|
+ let row = this.tableRadio;
|
|
|
|
|
|
|
|
let param = {
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
token: localStorage.token,
|
|
|
- userId: detectorid,
|
|
|
|
|
- status: 9,//0禁用1启用9删除
|
|
|
|
|
|
|
+ userId: row.UserId,
|
|
|
|
|
+ auId: row.AuId,
|
|
|
};
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
let postdata = qs.stringify(param);
|
|
|
|
|
|
|
|
- this.$confirm('此操作将永久删除该会员, 是否继续?', '提示', {
|
|
|
|
|
|
|
+ this.$confirm('此操作将永久删除该跨店会员, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
- VipUserStatusEdit(postdata).then(res => {
|
|
|
|
|
|
|
+ AcrossVipUserDel(postdata).then(res => {
|
|
|
let json = res;
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
if (json.Code == 0) {
|
|
|
that.$message({
|
|
that.$message({
|
|
|
showClose: true,
|
|
showClose: true,
|
|
|
- message: '选中的会员已删除!',
|
|
|
|
|
|
|
+ message: '选中的跨店会员已删除!',
|
|
|
type: 'success'
|
|
type: 'success'
|
|
|
});
|
|
});
|
|
|
// 重载列表
|
|
// 重载列表
|
|
@@ -1004,6 +893,7 @@
|
|
|
if (to.name == 'AcrossVip') {
|
|
if (to.name == 'AcrossVip') {
|
|
|
// 加载课程选项
|
|
// 加载课程选项
|
|
|
this.getClassVipuserQueryByAdmin();
|
|
this.getClassVipuserQueryByAdmin();
|
|
|
|
|
+ this.getShopGroupQuery();
|
|
|
// 读取列表
|
|
// 读取列表
|
|
|
this.getTableQuery();
|
|
this.getTableQuery();
|
|
|
}
|
|
}
|