|
|
@@ -133,7 +133,8 @@
|
|
|
width="220px"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span class="lessonSpan" :style="{background:lesson.ClassColor}" v-for="lesson in scope.row.ClassInfo">{{lesson.ClassName}}</span>
|
|
|
+ <span class="lessonSpan" :style="{background:lesson.ClassColor}"
|
|
|
+ v-for="lesson in scope.row.ClassInfo">{{lesson.ClassName}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -162,7 +163,7 @@
|
|
|
@click="pauseRow(scope.row)">
|
|
|
禁用
|
|
|
</el-button>
|
|
|
- <el-button type="success" v-if="scope.row.UserInfo.Status == 0" size="mini"
|
|
|
+ <el-button type="success" v-if="scope.row.UserInfo.Status == 8" size="mini"
|
|
|
@click="runRow(scope.row)">
|
|
|
启用
|
|
|
</el-button>
|
|
|
@@ -247,7 +248,6 @@
|
|
|
<div v-if="dialogGift">
|
|
|
<el-input-number v-model="form.gifthour" :min="0" :max="9999" label="赠送课时调整"></el-input-number>
|
|
|
</div>
|
|
|
-
|
|
|
<div v-if="dialogExpTime">
|
|
|
<el-date-picker
|
|
|
v-model="form.expTime"
|
|
|
@@ -259,12 +259,14 @@
|
|
|
<el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"
|
|
|
:titles="['全部课程','已选课程']"></el-transfer>
|
|
|
</div>
|
|
|
-
|
|
|
<div class="dialogFooter">
|
|
|
- <!-- 当前课时-->
|
|
|
+ <!--课时调整-->
|
|
|
<el-button type="primary" size="small" @click="confirmLesson" v-if="dialogLesson">确定</el-button>
|
|
|
+ <!--赠送课时调整-->
|
|
|
<el-button type="primary" size="small" @click="confirmGift" v-if="dialogGift">确定</el-button>
|
|
|
+ <!-- 有效期调整-->
|
|
|
<el-button type="primary" size="small" @click="confirmExpTime" v-if="dialogExpTime">确定</el-button>
|
|
|
+ <!-- 课程增删-->
|
|
|
<el-button type="primary" size="small" @click="confirmLessonTable" v-if="dialogLessonTable">确定
|
|
|
</el-button>
|
|
|
<el-button size="small" @click="dialogVisible = false">取消</el-button>
|
|
|
@@ -281,6 +283,9 @@
|
|
|
VipUserAdd,
|
|
|
VipUserStatusEdit,
|
|
|
VipUserEdit,
|
|
|
+ VipUserHourEdit,
|
|
|
+ VipUserExpEdit,
|
|
|
+ VipUserClassEdit,
|
|
|
testTable,
|
|
|
testSelect
|
|
|
} from "../api/getApiRes";
|
|
|
@@ -336,6 +341,7 @@
|
|
|
userCode: '',
|
|
|
shopId: '',
|
|
|
Id: '',
|
|
|
+ userId: '',
|
|
|
vipType: 1,
|
|
|
normalhour: 0,
|
|
|
gifthour: 0,
|
|
|
@@ -384,7 +390,7 @@
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
userId: row.UserInfo.Id,
|
|
|
- status: 0,//状态 0:禁用 1:启用 9:删除
|
|
|
+ status: 8,//状态 8:禁用 1:启用 9:删除
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
VipUserStatusEdit(postdata).then(res => {
|
|
|
@@ -411,7 +417,7 @@
|
|
|
// 启用
|
|
|
runRow(row) {
|
|
|
let that = this;
|
|
|
- this.$confirm('是否启用用户' + row.UserInfo.Name + '?', '启用操作', {
|
|
|
+ this.$confirm('是否启用用户' + row.UserInfo.Name + '?', '启用操作', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
@@ -419,7 +425,7 @@
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
userId: row.UserInfo.Id,
|
|
|
- status: 1,//状态 0:禁用 1:启用 9:删除
|
|
|
+ status: 1,//状态 8:禁用 1:启用 9:删除
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
VipUserStatusEdit(postdata).then(res => {
|
|
|
@@ -483,7 +489,9 @@
|
|
|
return false
|
|
|
}
|
|
|
this.form.expTime = row.expTime;
|
|
|
- this.form.rowName = row.name;
|
|
|
+ this.form.rowName = row.UserInfo.Name;
|
|
|
+ this.form.userId = row.UserInfo.Id;
|
|
|
+ this.form.expTime = row.UserInfo.ExpTime
|
|
|
this.dialogVisible = true;
|
|
|
this.dialogExpTime = true;
|
|
|
},
|
|
|
@@ -507,8 +515,9 @@
|
|
|
return false
|
|
|
}
|
|
|
let row = this.multipleSelection[0];
|
|
|
- this.form.normalhour = row.Recovered;
|
|
|
- this.form.rowName = row.name;
|
|
|
+ this.form.normalhour = row.UserInfo.RemainNormalhour;
|
|
|
+ this.form.rowName = row.UserInfo.Name;
|
|
|
+ this.form.userId = row.UserInfo.Id;
|
|
|
this.dialogVisible = true;
|
|
|
this.dialogLesson = true;
|
|
|
|
|
|
@@ -533,14 +542,16 @@
|
|
|
return false
|
|
|
}
|
|
|
let row = this.multipleSelection[0];
|
|
|
- this.form.gifthour = row.Recovered;
|
|
|
- this.form.rowName = row.name;
|
|
|
+ this.form.gifthour = row.UserInfo.RemainGifthour;
|
|
|
+ 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.multipleSelection.length) {
|
|
|
this.$message({
|
|
|
@@ -559,8 +570,14 @@
|
|
|
return false
|
|
|
}
|
|
|
let row = this.multipleSelection[0];
|
|
|
- this.form.gifthour = row.Recovered;
|
|
|
- this.form.rowName = row.name;
|
|
|
+ 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)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ console.log(that.form.classlist);
|
|
|
this.dialogVisible = true;
|
|
|
this.dialogLessonTable = true;
|
|
|
},
|
|
|
@@ -679,14 +696,14 @@
|
|
|
confirmLesson() {
|
|
|
let that = this;
|
|
|
// checkNum
|
|
|
-
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- lesson: that.form.lesson,
|
|
|
+ userId: that.form.userId,
|
|
|
+ chgHour: that.form.normalhour,
|
|
|
+ chgType: 1,//课时类型 1:普通课时 2:赠送课时
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
+ VipUserHourEdit(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
// 关闭弹窗
|
|
|
@@ -706,15 +723,14 @@
|
|
|
// 确认提交赠送
|
|
|
confirmGift() {
|
|
|
let that = this;
|
|
|
- // checkNum
|
|
|
-
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- gift: that.form.gifthour,
|
|
|
+ userId: that.form.userId,
|
|
|
+ chgHour: that.form.gifthour,
|
|
|
+ chgType: 2,//课时类型 1:普通课时 2:赠送课时
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
+ VipUserHourEdit(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
// 关闭弹窗
|
|
|
@@ -738,11 +754,11 @@
|
|
|
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- expTime: that.form.expTime,
|
|
|
+ userId: that.form.userId,
|
|
|
+ expTime: nonTfmtDate(that.form.expTime, 16),
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
+ VipUserExpEdit(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
// 关闭弹窗
|
|
|
@@ -763,14 +779,15 @@
|
|
|
confirmLessonTable() {
|
|
|
let that = this;
|
|
|
// checkNum
|
|
|
+ let classList = that.form.dialogValue ? that.form.dialogValue.toString() : '';
|
|
|
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
- dialogValue: that.form.dialogValue,
|
|
|
+ userId: that.form.userId,
|
|
|
+ classList: classList,
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
+ VipUserClassEdit(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
// 关闭弹窗
|
|
|
@@ -1078,6 +1095,7 @@
|
|
|
display: block;
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
+
|
|
|
.lessonSpan {
|
|
|
width: 78px;
|
|
|
height: 22px;
|