|
|
@@ -7,11 +7,11 @@
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="4">
|
|
|
<em>姓名:</em>
|
|
|
- <el-input v-model="panel.USERCODE" placeholder="请输入姓名"></el-input>
|
|
|
+ <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<em>手机号:</em>
|
|
|
- <el-input v-model="panel.keyword" placeholder="请输入手机号"></el-input>
|
|
|
+ <el-input v-model="panel.phone" placeholder="请输入手机号"></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="4">
|
|
|
<el-button size="" type="primary" @click="query" plain>查询</el-button>
|
|
|
@@ -44,25 +44,25 @@
|
|
|
width="50">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="name"
|
|
|
+ prop="Name"
|
|
|
label="教练"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="tel"
|
|
|
+ prop="Phone"
|
|
|
label="手机号"
|
|
|
sortable
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Recovered"
|
|
|
+ prop="SumHour"
|
|
|
label="上课总时长(h)"
|
|
|
width="180"
|
|
|
sortable
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Status"
|
|
|
+ prop="TeacherId"
|
|
|
label="操作"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
@@ -84,20 +84,18 @@
|
|
|
<div class="">
|
|
|
<el-form ref="form" :model="form" label-width="160px">
|
|
|
<el-form-item label="手机号">
|
|
|
- <el-input v-model="form.userCode"></el-input>
|
|
|
+ <el-input v-model="form.phone"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="姓名">
|
|
|
<el-input v-model="form.name"></el-input>
|
|
|
</el-form-item>
|
|
|
-<!-- <el-form-item label="课时">-->
|
|
|
-<!-- <el-input-number v-model="form.lesson" :min="0" :max="99999" label="(天)"></el-input-number>-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
<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 == 1" @click="confirmEditMember">确定</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>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
@@ -107,6 +105,10 @@
|
|
|
<script>
|
|
|
import Global from '../Global.js'
|
|
|
import {
|
|
|
+ TeacherListQuery,
|
|
|
+ TeacherAdd,
|
|
|
+ TeacherEdit,
|
|
|
+ TeacherStatusEdit,
|
|
|
testTable,
|
|
|
testSelect
|
|
|
} from "../api/getApiRes";
|
|
|
@@ -125,8 +127,8 @@
|
|
|
dialogValue: [],
|
|
|
// panel 配置项目
|
|
|
panel: {
|
|
|
- usercode: '',
|
|
|
- username: '',
|
|
|
+ name: '',
|
|
|
+ phone: '',
|
|
|
compname: '',
|
|
|
keyword: '',
|
|
|
USERCODE: '',
|
|
|
@@ -167,11 +169,13 @@
|
|
|
name: '',
|
|
|
userCode: '',
|
|
|
shopId: '',
|
|
|
+ teacherId: 0,
|
|
|
memberType: 1,
|
|
|
lesson: 1,
|
|
|
gift: 1,
|
|
|
btnType: 0,//0新建,1编辑编辑
|
|
|
memo: '',
|
|
|
+ phone: '',
|
|
|
expTime: '',
|
|
|
dialogdata: [],//穿梭待选
|
|
|
dialogValue: [],//穿梭已选
|
|
|
@@ -184,7 +188,6 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.panelSelect();
|
|
|
this.getTableQuery();
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -193,15 +196,12 @@
|
|
|
let that = this;
|
|
|
this.clearForm();
|
|
|
|
|
|
- this.form.userCode = row.userCode;
|
|
|
- this.form.name = row.name;
|
|
|
- this.form.memberType = row.vipType;
|
|
|
- this.form.lesson = row.Recovered;
|
|
|
- this.form.gift = row.Recovered;
|
|
|
- this.form.memo = row.memo;
|
|
|
+ this.form.name = row.Name;
|
|
|
+ this.form.phone = row.Phone;
|
|
|
+ this.form.shopId = row.ShopId;
|
|
|
+ this.form.teacherId = row.TeacherId;
|
|
|
this.form.btnType = 1;
|
|
|
|
|
|
- this.form.shopId = row.Id;
|
|
|
this.dialogMemberVisible = true
|
|
|
this.dialogTitle = '编辑教练'
|
|
|
|
|
|
@@ -401,11 +401,11 @@
|
|
|
confirmMember() {
|
|
|
let that = this;
|
|
|
// checkNum
|
|
|
- if (!that.form.userCode) {
|
|
|
+ if (!that.form.phone) {
|
|
|
this.$message.error('错了哦,手机号不能为空');
|
|
|
return false
|
|
|
}
|
|
|
- if (!globalCheckPhone(that.form.userCode)) {
|
|
|
+ if (!globalCheckPhone(that.form.phone)) {
|
|
|
this.$message.error('错了哦,手机号格式不正确');
|
|
|
return false
|
|
|
}
|
|
|
@@ -417,25 +417,15 @@
|
|
|
this.$message.error('错了哦,教练名字数超过8个字');
|
|
|
return false
|
|
|
}
|
|
|
- if (that.form.memo) {
|
|
|
- if (that.form.memo.length > 200) {
|
|
|
- this.$message.error('错了哦,备注字数超过200个字');
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
+ shopId: localStorage.shopId,
|
|
|
name: that.form.name,
|
|
|
- memberType: that.form.memberType,
|
|
|
- lesson: that.form.lesson,
|
|
|
- gift: that.form.gift,
|
|
|
- memo: that.form.memo,
|
|
|
- dialogValue: that.form.dialogValue,
|
|
|
+ phone: that.form.phone,
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
+ TeacherAdd(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
// 关闭弹窗
|
|
|
@@ -453,15 +443,14 @@
|
|
|
})
|
|
|
},
|
|
|
confirmEditMember() {
|
|
|
- console.log(123);
|
|
|
let that = this;
|
|
|
// checkNum
|
|
|
- if (!that.form.userCode) {
|
|
|
+ if (!that.form.phone) {
|
|
|
this.$message.error('错了哦,手机号不能为空');
|
|
|
return false
|
|
|
}
|
|
|
- console.log(that.form.userCode);
|
|
|
- if (!globalCheckPhone(that.form.userCode)) {
|
|
|
+ console.log(that.form.phone);
|
|
|
+ if (!globalCheckPhone(that.form.phone)) {
|
|
|
this.$message.error('错了哦,手机号格式不正确');
|
|
|
return false
|
|
|
}
|
|
|
@@ -473,24 +462,15 @@
|
|
|
this.$message.error('错了哦,教练名字数超过8个字');
|
|
|
return false
|
|
|
}
|
|
|
- if (that.form.memo) {
|
|
|
- if (that.form.memo.length > 200) {
|
|
|
- this.$message.error('错了哦,备注字数超过200个字');
|
|
|
- return false
|
|
|
- }
|
|
|
- }
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- userCode: that.form.userCode,
|
|
|
+ shopId: localStorage.shopId,
|
|
|
+ teacherId: that.form.teacherId,
|
|
|
name: that.form.name,
|
|
|
- memberType: that.form.memberType,
|
|
|
- lesson: that.form.lesson,
|
|
|
- gift: that.form.gift,
|
|
|
- memo: that.form.memo,
|
|
|
- dialogValue: that.form.dialogValue,
|
|
|
+ phone: that.form.phone,
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
+ TeacherEdit(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
// 关闭弹窗
|
|
|
@@ -663,11 +643,11 @@
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
- let detectorid = that.multipleSelection[0].Id;
|
|
|
+ let TeacherId = that.multipleSelection[0].TeacherId;
|
|
|
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- detectorid: detectorid,
|
|
|
+ teacherId: TeacherId,
|
|
|
status: 9,//0禁用1启用9删除
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
@@ -677,7 +657,7 @@
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
- testSelect(postdata).then(res => {
|
|
|
+ TeacherStatusEdit(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
that.$message({
|
|
|
@@ -721,15 +701,11 @@
|
|
|
// 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- supregionid: 0,//
|
|
|
- regionid: this.panel.regionid,//
|
|
|
- comid: 1,//
|
|
|
- tagname: that.panel.tagname,//标签名
|
|
|
- start: 1,//
|
|
|
- tableMax: 9999,//
|
|
|
+ name: this.panel.name,//
|
|
|
+ phone: this.panel.phone,//
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testTable(postdata).then(res => {
|
|
|
+ TeacherListQuery(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
that.loading = false;
|
|
|
@@ -748,15 +724,6 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 导出excel
|
|
|
- btnExpAll() {
|
|
|
- let that = this;
|
|
|
- let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
|
|
|
- let bt = globaltime2String(that.panel.time1[0]);
|
|
|
- let et = globaltime2String(that.panel.time1[1]);
|
|
|
- let usercode = that.panel.usercode;
|
|
|
- window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
|
|
|
- },
|
|
|
// 设置分页数据
|
|
|
setPaginations() {
|
|
|
// 分页属性
|