Commit ed9b8c13 authored by 王's avatar

bug fix

parent a7a0a6ec
...@@ -233,6 +233,9 @@ ...@@ -233,6 +233,9 @@
// this.initPage() // this.initPage()
this.getTeachers(); this.getTeachers();
this.getGoodsOption(); this.getGoodsOption();
if(this.dialogObj.form.goods_id){
this.getLessonDetail(this.dialogObj.form.goods_id);
}
this.form = this.dialogObj.form; this.form = this.dialogObj.form;
this.teacherList = this.dialogObj.form.teacher_ids; this.teacherList = this.dialogObj.form.teacher_ids;
} }
......
...@@ -37,7 +37,13 @@ ...@@ -37,7 +37,13 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="现价"> label="商品原价/直购价">
<template slot-scope="scope">
{{scope.row.original_price/100}}
</template>
</el-table-column>
<el-table-column
label="商品现价/团购价">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.current_price/100}} {{scope.row.current_price/100}}
</template> </template>
......
...@@ -7,13 +7,24 @@ ...@@ -7,13 +7,24 @@
<el-input v-model="searchFrom.name"></el-input> <el-input v-model="searchFrom.name"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-form-item label="教师类型">
<el-select v-model="searchFrom.type" placeholder="请选择">
<el-option
v-for="item in teacherTypeOption"
:key="item.id"
:label="item.label"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item> <el-form-item>
<el-button type="primary" plain>搜索</el-button> <el-button type="primary" plain @click="getUser">搜索</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" :offset="12"> <el-col :span="4" :offset="8">
<el-form-item> <el-form-item>
<el-button type="success" plain @click="add">新增教师</el-button> <el-button type="success" plain @click="add">新增教师</el-button>
</el-form-item> </el-form-item>
...@@ -35,6 +46,12 @@ ...@@ -35,6 +46,12 @@
prop="alias" prop="alias"
label="微信号"> label="微信号">
</el-table-column> </el-table-column>
<el-table-column
label="状态">
<template slot-scope="scope">
{{scope.row.status === 0 ? '正常' : '禁用'}}
</template>
</el-table-column>
<el-table-column <el-table-column
prop="invite_code" prop="invite_code"
label="邀请码"> label="邀请码">
...@@ -54,12 +71,9 @@ ...@@ -54,12 +71,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="250" width="180"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" plain type="primary" @click="detail(scope.row)">
查看详情
</el-button>
<el-button size="mini" plain type="warning" @click="edit(scope.row)"> <el-button size="mini" plain type="warning" @click="edit(scope.row)">
编辑 编辑
</el-button> </el-button>
...@@ -94,6 +108,24 @@ ...@@ -94,6 +108,24 @@
show:false, show:false,
id:'' id:''
}, },
teacherTypeOption: [
{
id: 0,
label: '老师'
},
{
id: 1,
label: '新星妈妈'
},
{
id: 2,
label: '推广人'
},
{
id: 3,
label: '市场'
}
]
} }
}, },
components:{ components:{
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<el-row> <el-row>
<el-col :span="4"><label>手机号</label></el-col> <el-col :span="4"><label>手机号</label></el-col>
<el-col :span="8">{{userDetail.mobile}}</el-col> <el-col :span="8">{{userDetail.mobile}}</el-col>
<el-col :span="4"><label>创建时间</label></el-col> <el-col :span="4"><label>注册时间</label></el-col>
<el-col :span="8">{{userDetail.created_at}}</el-col> <el-col :span="8">{{userDetail.created_at}}</el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -31,6 +31,12 @@ ...@@ -31,6 +31,12 @@
<el-col :span="4"><label>最后登录</label></el-col> <el-col :span="4"><label>最后登录</label></el-col>
<el-col :span="8">{{userDetail.last_login_at}}</el-col> <el-col :span="8">{{userDetail.last_login_at}}</el-col>
</el-row> </el-row>
<el-row align="middle" type="flex">
<el-col :span="4"><label>邀请码</label></el-col>
<el-col :span="8">
{{userDetail.invite_code}}
</el-col>
</el-row>
</el-dialog> </el-dialog>
</template> </template>
......
...@@ -35,6 +35,17 @@ ...@@ -35,6 +35,17 @@
prop="nickname" prop="nickname"
label="用户名"> label="用户名">
</el-table-column> </el-table-column>
<el-table-column
prop="avatar"
label="头像">
<template slot-scope="scope">
<img class="avatar" :src="scope.row.avatar">
</template>
</el-table-column>
<el-table-column
prop="invite_code"
label="邀请码">
</el-table-column>
<el-table-column <el-table-column
prop="mobile" prop="mobile"
label="手机号"> label="手机号">
...@@ -43,6 +54,14 @@ ...@@ -43,6 +54,14 @@
prop="level" prop="level"
label="等级"> label="等级">
</el-table-column> </el-table-column>
<el-table-column
prop="created_at"
label="注册时间">
</el-table-column>
<el-table-column
prop="last_login_at"
label="最后登录时间">
</el-table-column>
<el-table-column <el-table-column
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -53,14 +72,14 @@ ...@@ -53,14 +72,14 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" v-model="nowPage"/> <page :total="total" v-model="nowPage"/>
<detail v-model="showDetail" :showId="showId" /> <detail-dialog :showDetail = "showDetail" :showId="showId" />
</div> </div>
</template> </template>
<script> <script>
import {getUserListApi} from "../../service/api"; import {getUserListApi} from "../../service/api";
import page from '../framework/page' import page from '../framework/page'
import detail from './detail' import detailDialog from './detail'
export default { export default {
name: "index", name: "index",
data(){ data(){
...@@ -79,7 +98,7 @@ ...@@ -79,7 +98,7 @@
}, },
components:{ components:{
page, page,
detail detailDialog
}, },
mounted(){ mounted(){
this.getUser() this.getUser()
...@@ -105,6 +124,9 @@ ...@@ -105,6 +124,9 @@
<style scoped lang="less"> <style scoped lang="less">
@import "../../util/public"; @import "../../util/public";
.avatar {
width: 50px;
}
.user{ .user{
height: 100%; height: 100%;
overflow: auto; overflow: auto;
......
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