Commit 06eb8101 authored by chenfenglei's avatar chenfenglei

新增云集菜单,关键字回复加分页,班级列表展示班级名称,编辑默认班级名称

parent 806dcd3d
<template>
<el-dialog
:title="dialogObj.title"
:visible.sync="dialogObj.show"
>
</el-dialog>
</template>
<script>
export default {
props:[
'dialogObj'
],
data(){
return{
}
},
methods:{
initPage(){
},
},
watch:{
'dialogObj'(value){
this.initPage()
}
}
}
</script>
<style scoped>
</style>
...@@ -26,9 +26,13 @@ ...@@ -26,9 +26,13 @@
:data="firstList" :data="firstList"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="teacher_name"
label="班主任名字" label="班主任名字"
> >
<template slot-scope="scope">
<!-- <el-button type="text" @click="nameClick(scope.row)"> -->
{{scope.row.teacher_name}}
<!-- </el-button> -->
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="total_money" prop="total_money"
...@@ -81,9 +85,13 @@ ...@@ -81,9 +85,13 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="teacher_name"
label="班主任名字" label="班主任名字"
> >
<template slot-scope="scope">
<!-- <el-button type="text" @click="nameClick(scope.row)"> -->
{{scope.row.teacher_name}}
<!-- </el-button> -->
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="total_money" prop="total_money"
...@@ -108,11 +116,13 @@ ...@@ -108,11 +116,13 @@
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<class-dialog :dialogObj="dialogObj"></class-dialog>
</div> </div>
</template> </template>
<script> <script>
import {getTeacherRankListApi,getTeacherDayRankListApi} from "../../service/api"; import {getTeacherRankListApi,getTeacherDayRankListApi} from "../../service/api";
import classDialog from './dialog'
export default { export default {
name: "index", name: "index",
data(){ data(){
...@@ -125,9 +135,18 @@ ...@@ -125,9 +135,18 @@
}, },
searchSecondFrom:{ searchSecondFrom:{
dateValue:[] dateValue:[]
} },
dialogObj:{
show:false,
title:'售卖课程',
id:"",
time:""
},
} }
}, },
components:{
classDialog,
},
mounted(){ mounted(){
this.defaultTime(); this.defaultTime();
this.searchFirstPage(); this.searchFirstPage();
...@@ -181,7 +200,11 @@ ...@@ -181,7 +200,11 @@
let end = `${year}-${Month}-${Day}` let end = `${year}-${Month}-${Day}`
this.searchFirstFrom.dateValue = [star,end] this.searchFirstFrom.dateValue = [star,end]
this.searchSecondFrom.dateValue = [star,end] this.searchSecondFrom.dateValue = [star,end]
} },
nameClick(val){
console.log(val)
this.dialogObj.show=true;
},
} }
} }
</script> </script>
......
...@@ -14,14 +14,17 @@ ...@@ -14,14 +14,17 @@
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="老师"> <el-form-item label="老师">
<el-select v-model="form.teacher_id" placeholder="请选择" filterable > <el-select v-model="form.teacher_id" placeholder="请选择" filterable @change="selectName(teacherList,form.teacher_id)">
<el-option <el-option
v-for="(data,index) in teacherList" v-for="(data,index) in teacherList"
:key="index" :key="index"
:label="data.name" :label="data.name"
:value="data.id"> :value="data.id" >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
<el-form-item label="班级名称">
<el-input v-model="form.className" style="width:220px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="最大学员"> <el-form-item label="最大学员">
<el-input-number v-model="form.max_join_num"></el-input-number> <el-input-number v-model="form.max_join_num"></el-input-number>
...@@ -44,7 +47,8 @@ ...@@ -44,7 +47,8 @@
return{ return{
form:{ form:{
teacher_id:'', teacher_id:'',
max_join_num:'' max_join_num:'',
className:""
}, },
teacherList:[], teacherList:[],
exitTeacherList: [], exitTeacherList: [],
...@@ -114,7 +118,8 @@ ...@@ -114,7 +118,8 @@
getClassDetailApi(this.dialogObj.id).then(res=>{ getClassDetailApi(this.dialogObj.id).then(res=>{
this.form = { this.form = {
teacher_id: parseInt(res.teacher_id), teacher_id: parseInt(res.teacher_id),
max_join_num:res.max_join_num max_join_num:res.max_join_num,
className:res.class_name
}; };
this.getTeacher(); this.getTeacher();
}) })
...@@ -171,6 +176,12 @@ ...@@ -171,6 +176,12 @@
this.periods = nowGoods.children.find(i=>{return i.id === data[1]}); this.periods = nowGoods.children.find(i=>{return i.id === data[1]});
this.getTeacherByPeriods() this.getTeacherByPeriods()
} }
},
selectName(val,id){
let filterVal=val.filter(function(item,i){
return item.id == id
});
this.form.className=filterVal[0].name+"一班";
} }
}, },
watch:{ watch:{
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<el-button type="primary" @click="searchList">搜索</el-button> <el-button type="primary" @click="searchList">搜索</el-button>
<el-button type="success" @click="changeClass" v-if="!$store.state.readonly">切换班级</el-button> <el-button type="success" @click="changeClass" v-if="!$store.state.readonly">切换班级</el-button>
<el-button type="success" @click="onAddUser(false)" v-if="!$store.state.readonly">+添加用户</el-button> <el-button type="success" @click="onAddUser(false)" v-if="!$store.state.readonly">+添加用户</el-button>
<el-button type="primary" @click="exportTable">导出</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
...@@ -425,11 +426,13 @@ ...@@ -425,11 +426,13 @@
</template> </template>
<script> <script>
import {addClassUesrApi,getClassUserApi,changeUserApi,delClassUserApi,getUserListApi,addPeriodsClassUserDescApi,getClassStatisticsApi,userLookApi,getPeriodsApi,changeClassApi,getClassListApi,addUserTeacherApi,getUserDescListApi,updateUserPrivilegeApi,teacherBindUserApi,getJoinNumApi} from "../../service/api"; import {addClassUesrApi,getClassUserApi,changeUserApi,delClassUserApi,getUserListApi,addPeriodsClassUserDescApi,getClassStatisticsApi,userLookApi,getPeriodsApi,changeClassApi,getClassListApi,addUserTeacherApi,getUserDescListApi,updateUserPrivilegeApi,teacherBindUserApi,getJoinNumApi,exportExcelApi} from "../../service/api";
import page from '../framework/page' import page from '../framework/page'
import page2 from '../framework/page' import page2 from '../framework/page'
import pageDesc from '../framework/page' import pageDesc from '../framework/page'
import {ISORNOT} from "../../util/wordbook"; import {ISORNOT} from "../../util/wordbook";
import CommonJs from '../../util/common';
export default { export default {
name: "userList", name: "userList",
...@@ -627,7 +630,6 @@ ...@@ -627,7 +630,6 @@
limit:500 limit:500
}; };
let json2 = {}; let json2 = {};
console.log(this.timeLang);
if(this.timeLang && this.timeLang.length > 1){ if(this.timeLang && this.timeLang.length > 1){
json.start_at = this.timeLang[0]; json.start_at = this.timeLang[0];
json.end_at = this.timeLang[1]; json.end_at = this.timeLang[1];
...@@ -894,7 +896,24 @@ ...@@ -894,7 +896,24 @@
this.initPage() this.initPage()
}); });
}); });
} },
exportTable(){
let json = {};
if (this.searchFrom.user_id) {
json.user_id = this.searchFrom.user_id
}
if (this.searchFrom.is_add_teacher) {
json.is_add_teacher = this.searchFrom.is_add_teacher
}
if (this.searchFrom.is_view_course) {
json.is_view_course = this.searchFrom.is_view_course
}
if(this.timeLang && this.timeLang.length > 0){
json.pay_start_at =this.timeLang[0];
json.pay_end_at =this.timeLang[1]
}
exportExcelApi(`api/admin/class/user/export/${this.userObj.classId}`,json);
},
}, },
watch:{ watch:{
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<el-input v-model="searchFrom.out_trade_no"></el-input> <el-input v-model="searchFrom.out_trade_no"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="购买时间"> <el-form-item label="购买时间">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
...@@ -93,6 +93,11 @@ ...@@ -93,6 +93,11 @@
<el-button type="primary" plain @click="exportTable">导出</el-button> <el-button type="primary" plain @click="exportTable">导出</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="3" :offset="3" v-if="!$store.state.readonly">
<el-form-item>
<el-button type="success" plain @click="add">新增订单</el-button>
</el-form-item>
</el-col> -->
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table
...@@ -249,6 +254,7 @@ ...@@ -249,6 +254,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<address-dialog v-if="dialogObj.show" :dialogObj="dialogObj" @reflash="onUpdateAddress"></address-dialog> <address-dialog v-if="dialogObj.show" :dialogObj="dialogObj" @reflash="onUpdateAddress"></address-dialog>
<order-dialog v-if="newdialogObj.show" :newdialogObj="newdialogObj"></order-dialog>
<refund-dialog :dialogObj="refundDialogObj" @reflash="onAfterRefund" @changeShow="changeShow"></refund-dialog> <refund-dialog :dialogObj="refundDialogObj" @reflash="onAfterRefund" @changeShow="changeShow"></refund-dialog>
<detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeDetailShow"/> <detail-dialog :dialogObj="dialogDetailObj" @changeShow="changeDetailShow"/>
<source-dialog :dialogObj="sourceDialog"/> <source-dialog :dialogObj="sourceDialog"/>
...@@ -292,6 +298,7 @@ ...@@ -292,6 +298,7 @@
import {getOrderListApi,editOrderDescApi,getGoodsListApi,getRefundListApi,exportExcelApi,getTeacherListApi,updateOrderTeacherApi} from "../../service/api"; import {getOrderListApi,editOrderDescApi,getGoodsListApi,getRefundListApi,exportExcelApi,getTeacherListApi,updateOrderTeacherApi} from "../../service/api";
import page from '../framework/page' import page from '../framework/page'
import addressDialog from './dialog' import addressDialog from './dialog'
import orderDialog from './newDialog'
import sourceDialog from './sourceDialog' import sourceDialog from './sourceDialog'
import refundDialog from './refundDialog' import refundDialog from './refundDialog'
import couponDialog from './couponDialog' import couponDialog from './couponDialog'
...@@ -334,6 +341,9 @@ ...@@ -334,6 +341,9 @@
tableData: [], tableData: [],
dialogObj: { dialogObj: {
show: false show: false
},
newdialogObj: {
show: false
}, },
refundDialogObj: { refundDialogObj: {
show: false, show: false,
...@@ -632,10 +642,14 @@ ...@@ -632,10 +642,14 @@
this.getOrderList(); this.getOrderList();
}); });
}); });
} },
add(){
this.newdialogObj.show=true;
},
}, },
components: { components: {
addressDialog, addressDialog,
orderDialog,
refundDialog, refundDialog,
detailDialog, detailDialog,
refundDetail, refundDetail,
......
<template>
<el-dialog
title="新增订单"
center
append-to-body
:visible.sync="newdialogObj.show"
width="800px">
<div slot="footer" class="dialog-footer">
<el-button @click="newdialogObj.show = false">取 消</el-button>
<el-button type="primary" @click="saveAddOrder">保 存</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: "newdialogObj",
props:[
'newdialogObj'
],
data(){
return{
}
},
methods:{
saveAddOrder(){
}
},
mounted(){
}
}
</script>
<style scoped lang="less">
.dialog-footer{
display: block;
text-align: center;
}
</style>
...@@ -107,14 +107,11 @@ ...@@ -107,14 +107,11 @@
methods:{ methods:{
beforeAvatarUploadImg(file){ beforeAvatarUploadImg(file){
const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png' ); const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png' );
const isLt2M = file.size / 1024 < 150;
if (!isJPG) { if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!'); this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
} }
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 150KB!'); return isJPG;
}
return isJPG && isLt2M;
}, },
imgInter(){ imgInter(){
if(this.form.imgList.length < 1){ if(this.form.imgList.length < 1){
......
...@@ -107,14 +107,10 @@ ...@@ -107,14 +107,10 @@
methods:{ methods:{
beforeAvatarUploadImg(file){ beforeAvatarUploadImg(file){
const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png' ); const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png' );
const isLt2M = file.size / 1024 < 150;
if (!isJPG) { if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!'); this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
} }
if (!isLt2M) { return isJPG;
this.$message.error('上传头像图片大小不能超过 150KB!');
}
return isJPG && isLt2M;
}, },
imgInter1(){ imgInter1(){
if(this.form.imgList1.length < 1){ if(this.form.imgList1.length < 1){
......
<template> <template>
<div class="user"> <div class="user">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px" class="search-form" inline> <el-form ref="searchFrom" :model="searchFrom" label-width="100px" class="search-form" inline>
<el-form-item label="商品名称"> <el-form-item label="商品标题">
<el-input v-model="searchFrom.name"></el-input> <el-input v-model="searchFrom.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品类型"> <el-form-item label="商品类型">
......
<template>
<div class="sms">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="类型">
<el-select v-model="searchFrom.type" placeholder="请选择" @change="getList">
<el-option label="全部" value=""></el-option>
<el-option
v-for="item in TypeList"
:key="item.status"
:label="item.value"
:value="item.status">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="手机号">
<el-input v-model="searchFrom.mobile" @change="getList"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="发送状态">
<el-select v-model="searchFrom.status" placeholder="请选择" @change="getList">
<el-option label="全部" value=""></el-option>
<el-option
v-for="item in useTypeList"
:key="item.status"
:label="item.value"
:value="item.status">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-button type="primary" @click="getList">搜索</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data="list"
style="width: 100%">
<el-table-column
prop="id"
label="发送编号">
</el-table-column>
<el-table-column
prop="mobile"
label="手机号">
</el-table-column>
<el-table-column
prop="sms_code"
label="短信验证码">
</el-table-column>
<el-table-column
label="发送状态">
<template slot-scope="scope">
{{scope.row.status | filterStatus}}
</template>
</el-table-column>
<el-table-column
prop="created_at"
label="发送时间" sortable>
</el-table-column>
</el-table>
<page :nowPage="nowPage" :total="total" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div>
</template>
<script>
import page from '../framework/page'
import {getsmsRecordApi} from "../../service/api";
export default {
name: "smsRecord",
components:{
page
},
data(){
return {
nowPage: 1,
total: 0,
limit: 10,
useTypeList:[
{
status:0,
value:'成功'
},
{
status:1,
value:'失败'
},
],
TypeList:[
{
status:0,
value:'注册验证码'
},
],
searchFrom: {
type: '',
mobile:'',
status:''
},
list: []
}
},
filters:{
filterStatus:function (value) {
let msg = '';
if(value === 0){
msg = '成功'
}else{
msg = '失败'
}
return msg;
}
},
mounted(){
this.getList()
},
methods: {
onPageChange(val){
this.nowPage = val;
this.getList()
},
onSizeChange(val){
this.nowPage = 1;
this.limit = val;
this.getList()
},
getList(){
let json = {
limit: this.limit,
page: this.nowPage,
};
if(this.searchFrom.type){
json.type = this.searchFrom.type
}
if(this.searchFrom.status || this.searchFrom.status==0){
json.status = this.searchFrom.status
}
if(this.searchFrom.mobile){
json.mobile = this.searchFrom.mobile
}
getsmsRecordApi(json).then((res)=>{
this.total = res.total;
this.list = res.list ? res.list : []
})
}
}
}
</script>
<style scoped>
.sms{
padding: 20px 0;
}
.avatar {
width:50px;
height: 50px;
border-radius: 50%;
}
</style>
<style>
.userInfo >div{
display: flex;
flex-flow: row nowrap;
justify-content: flex-start;
align-items: center;
}
</style>
...@@ -39,8 +39,12 @@ ...@@ -39,8 +39,12 @@
}, },
methods:{ methods:{
initPage(){ initPage(){
getTeacherListApi().then(res=>{ let json ={
this.teacherList = res.list page:1,
limit:200
}
getTeacherListApi(json).then(res=>{
this.teacherList = res.list;
}); });
this.form = { this.form = {
id: this.dialogObj.id, id: this.dialogObj.id,
......
...@@ -150,11 +150,12 @@ ...@@ -150,11 +150,12 @@
label="创建时间"> label="创建时间">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作"> label="操作" width="400px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="showUser(scope.row)" size="mini" plain type="primary"> <el-button @click="showUser(scope.row)" size="mini" type="primary"> 班级成员</el-button>
班级成员 <!-- <el-button size="mini" type="warning">编辑</el-button>
</el-button> <el-button size="mini" type="primary">备注</el-button>
<el-button size="mini" type="primary">看课情况 </el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -109,16 +109,22 @@ ...@@ -109,16 +109,22 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getList"/> <dialog-com :dialogObj="dialogObj" @changeShow="changeShow" @reflash="getList"/>
<page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</template> </template>
<script> <script>
import dialogCom from './autoReplyDialog' import dialogCom from './autoReplyDialog'
import {getConfigListApi,deleteConfigApi,getConfigDetailApi} from "../../service/api"; import {getConfigListApi,deleteConfigApi,getConfigDetailApi} from "../../service/api";
import page from '../framework/page'
export default { export default {
name: "autoReply", name: "autoReply",
data() { data() {
return { return {
total:0,
nowPage:1,
limit: 10,
dialogObj:{ dialogObj:{
value:'', value:'',
desc:'', desc:'',
...@@ -130,7 +136,8 @@ ...@@ -130,7 +136,8 @@
} }
}, },
components:{ components:{
dialogCom dialogCom,
page
}, },
mounted(){ mounted(){
this.getList() this.getList()
...@@ -157,6 +164,15 @@ ...@@ -157,6 +164,15 @@
} }
}, },
methods: { methods: {
onPageChange(val){
this.nowPage = val;
this.getList();
},
onSizeChange(val){
this.nowPage = 1;
this.limit = val;
this.getList();
},
// 将匹配结果替换表情图片 // 将匹配结果替换表情图片
emotion (res) { emotion (res) {
let word = res.replace(/\//gi,'') let word = res.replace(/\//gi,'')
...@@ -168,13 +184,21 @@ ...@@ -168,13 +184,21 @@
this.dialogObj.show=data this.dialogObj.show=data
}, },
getList(){ getList(){
getConfigListApi({key: this.activeName}).then(res => { let json={
key:this.activeName,
limit: this.limit,
page: this.nowPage
};
getConfigListApi(json).then(res => {
for(var i=0;i<res.list.length;i++){ for(var i=0;i<res.list.length;i++){
if(res.list[i].desc){ if(res.list[i].desc){
res.list[i].desc= JSON.parse(res.list[i].desc) res.list[i].desc= JSON.parse(res.list[i].desc)
} }
} }
this.list = res.list this.list = res.list;
this.total = res.total;
}) })
}, },
add(){ add(){
......
<template>
<div class="sms">
<el-form ref="searchFrom" :model="searchFrom" label-width="100px">
<el-row>
<el-col :span="4">
<el-form-item label="交易订单号">
<el-input v-model="searchFrom.order_id" @change="getList"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="手机号">
<el-input v-model="searchFrom.mobile" @change="getList"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="发货状态">
<el-select v-model="searchFrom.status" placeholder="请选择" @change="getList">
<el-option label="全部" value=""></el-option>
<el-option
v-for="item in useTypeList"
:key="item.status"
:label="item.value"
:value="item.status">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="商品名称">
<el-select v-model="searchFrom.goods_id" placeholder="请选择" @change="getList" clearable>
<el-option
v-for="(data,index) in goodList"
:key="index"
:label="data | filterGoods"
:value="data.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-button type="primary" @click="getList">搜索</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data="list"
style="width: 100%">
<el-table-column
prop="order_id"
label="订单号">
</el-table-column>
<el-table-column
prop="nickname"
label="购买人">
<template slot-scope="scope">
<img class="avatar" :src="scope.row.avatar"/> {{scope.row.nickname}}<br>(ID:{{scope.row.user_id}})
</template>
</el-table-column>
<el-table-column
prop="goods_name"
label="商品名称" >
</el-table-column>
<el-table-column
label="发货状态">
<template slot-scope="scope">
{{scope.row.status | filterStatus}}
</template>
</el-table-column>
<el-table-column
prop="mobile"
label="手机号" >
</el-table-column>
<el-table-column
label="收货地址" >
<template slot-scope="scope">
{{scope.row.receiver_name}} {{scope.row.receiver_phone}} {{scope.row.receiver_province}} {{scope.row.receiver_city}} {{scope.row.receiver_area}} {{scope.row.receiver_address}}
</template>
</el-table-column>
<el-table-column
prop="create_time"
label="购买时间" sortable>
</el-table-column>
<el-table-column
prop="pay_time"
label="下单时间" sortable>
</el-table-column>
<el-table-column
prop="buyer_comment"
label="备注" >
</el-table-column>
</el-table>
<page :nowPage="nowPage" :total="total" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div>
</template>
<script>
import page from '../framework/page'
import {getyunjiApi,getGoodsListApi} from "../../service/api";
import {GOODSTYPE} from "../../util/wordbook";
export default {
name: "smsRecord",
components:{
page
},
data(){
return {
nowPage: 1,
total: 0,
limit: 10,
useTypeList:[
{
status:40,
value:'待发货'
},
{
status:50,
value:'已发货'
},
],
searchFrom: {
goods_id: '',
mobile:'',
order_id:''
},
list: [],
goodList:[],
}
},
filters:{
filterStatus:function (value) {
let msg = '';
if(value === 40){
msg = '待发货'
}else{
msg = '已发货'
}
return msg;
},
filterGoods(val){
return '[' + GOODSTYPE[val.goods_type] + ']' + '[' +val.current_price / 100 + '元]' + val.name
}
},
mounted(){
this.getList();
this.getGoodsOption();
},
methods: {
onPageChange(val){
this.nowPage = val;
this.getList()
},
onSizeChange(val){
this.nowPage = 1;
this.limit = val;
this.getList()
},
getList(){
let json = {
limit: this.limit,
page: this.nowPage,
};
if(this.searchFrom.mobile){
json.mobile = this.searchFrom.mobile
}
if(this.searchFrom.goods_name){
json.goods_name = this.searchFrom.goods_name
}
if(this.searchFrom.status || this.searchFrom.status==0){
json.status = this.searchFrom.status
}
if(this.searchFrom.order_id){
json.order_id = this.searchFrom.order_id
}
if(this.searchFrom.goods_id){
json.goods_id = this.searchFrom.goods_id
}
getyunjiApi(json).then((res)=>{
if(this.searchFrom.status !== ''){
switch(this.searchFrom.status){
case 40:
res.list=res.list.filter(function(item,i){
return item.status == 40
});
break;
case 50:
res.list=res.list.filter(function(item,i){
return item.status == 50
});
break;
}
}
this.total = res.total;
this.list = res.list ? res.list : []
})
},
getGoodsOption(){
let json = {
page: 1,
limit: 100
};
getGoodsListApi(json).then(res=>{
this.goodList = res.list;
})
},
}
}
</script>
<style scoped>
.sms{
padding: 20px 0;
}
.avatar {
width:50px;
height: 50px;
border-radius: 50%;
}
</style>
<style>
.userInfo >div{
display: flex;
flex-flow: row nowrap;
justify-content: flex-start;
align-items: center;
}
</style>
...@@ -772,4 +772,14 @@ export const putConfigApi = function(json) { ...@@ -772,4 +772,14 @@ export const putConfigApi = function(json) {
const getClassConfigUrl = `/api/admin/user/receive/course/log`; const getClassConfigUrl = `/api/admin/user/receive/course/log`;
export const getClassConfigApi = function(json) { export const getClassConfigApi = function(json) {
return Vue.prototype.$fetch(`${getClassConfigUrl}`, json) return Vue.prototype.$fetch(`${getClassConfigUrl}`, json)
}
//短信发送记录
const getsmsRecordUrl = `/api/admin/sms/log/list`;
export const getsmsRecordApi = function(json) {
return Vue.prototype.$fetch(`${getsmsRecordUrl}`, json)
}
//云集订单列表
const getyunjiUrl = `/api/admin/yunji/order`;
export const getyunjiApi = function(json) {
return Vue.prototype.$fetch(`${getyunjiUrl}`, json)
} }
\ No newline at end of file
...@@ -180,6 +180,17 @@ export default [{ ...@@ -180,6 +180,17 @@ export default [{
component: e => require(['@/components/notBuyClass'], e), component: e => require(['@/components/notBuyClass'], e),
} }
}, },
{
value: '云集订单列表',
routerName: 'yunji',
path: '/yunji',
cover: '5-9',
router: {
path: '/yunji',
name: 'yunji',
component: e => require(['@/components/yunji'], e),
}
},
{ {
value: '业绩排行', value: '业绩排行',
routerName: 'achievement', routerName: 'achievement',
...@@ -348,6 +359,17 @@ export default [{ ...@@ -348,6 +359,17 @@ export default [{
component: e => require(['@/components/sourceManage'], e), component: e => require(['@/components/sourceManage'], e),
} }
}, },
{
value: '短信发送记录',
routerName: 'smsRecord',
path: '/smsRecord',
cover: '10-2',
router: {
path: '/smsRecord',
name: 'smsRecord',
component: e => require(['@/components/smsRecord'], e),
}
},
] ]
}, },
{ {
......
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