Commit d2998d1b authored by chenfenglei's avatar chenfenglei

云集添加备注,扫码备注

parent ba8c1a61
...@@ -298,7 +298,8 @@ ...@@ -298,7 +298,8 @@
show:true, show:true,
goods_id:this.goods_id, goods_id:this.goods_id,
title:`${data.teacher_name}班级用户列表`, title:`${data.teacher_name}班级用户列表`,
teacherId: data.teacher_id teacherId: data.teacher_id,
class_name:data.class_name
} }
}, },
getTeacher(){ getTeacher(){
......
...@@ -579,7 +579,26 @@ ...@@ -579,7 +579,26 @@
this.changeClassObj.periods_list = res.list this.changeClassObj.periods_list = res.list
}); });
this.changeClassObj.show = true; this.changeClassObj.show = true;
this.defaultClass();
} }
},
defaultClass(){
// console.log(this.userObj.periods_id,this.userObj.classId)
// // this.goods_id =this.userObj.periods_id;
// this.changeClassObj.selectedGoods = [parseInt(this.userObj.periods_id),parseInt(this.userObj.classId)];
// console.log(this.changeClassObj.selectedGoods[0])
// getClassListApi({goods_id:this.changeClassObj.selectedGoods[0]}).then(res=>{
// res.list.forEach(i=>{i.name = i.title});
// res.list.forEach(i=>{
// i.title = i.class_name
// });
// console.log(res.list)
// // console.log( this.changeClassObj.periods_list)
// // this.changeClassObj.periods_list.find(i=>{return i.id === this.changeClassObj.selectedGoods[0]}).children = res.list
// // let nowGoods = this.changeClassObj.periods_list.find(i=>{return i.id === this.changeClassObj.selectedGoods[0]});
// // this.periods = nowGoods.children.find(i=>{return i.id === this.changeClassObj.selectedGoods[1]});
// })
}, },
handleSelectionChange123(a){ handleSelectionChange123(a){
this.selectUserList = a this.selectUserList = a
......
...@@ -95,8 +95,7 @@ ...@@ -95,8 +95,7 @@
}); });
getConfigListApi({key:this.searchFrom2.key}).then(res=>{ getConfigListApi({key:this.searchFrom2.key}).then(res=>{
if(res.list && res.list.length>0){ if(res.list && res.list.length>0){
// this.searchFrom2.desc = res.list[0].desc; // 期数默认配置
// this.selectedGoods = [parseInt(res.goods_id),parseInt(res.list[0].value)];
// console.log(res.list) // console.log(res.list)
}else{ }else{
this.searchFrom2.value = ''; this.searchFrom2.value = '';
......
<template> <template>
<div class="not_buy"> <div class="not_buy">
<el-form ref="searchFrom" :model="searchFrom" label-width="80px" inline>
<el-form-item label="用户ID">
<el-input v-model="searchFrom.user_id" @change="getList"></el-input>
</el-form-item>
<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-form-item>
<el-button type="primary" plain @click="getList">搜索</el-button>
</el-form-item>
</el-form>
<div class="head clear-both"> <div class="head clear-both">
<el-button plain type="success" style="float: right;margin-bottom:20px;" v-if="!$store.state.readonly" @click="entranceObj.show=true">无需登录入口</el-button> <el-button plain type="success" style="float: right;margin-bottom:20px;" v-if="!$store.state.readonly" @click="entranceObj.show=true">无需登录入口</el-button>
</div> </div>
...@@ -21,6 +40,14 @@ ...@@ -21,6 +40,14 @@
</el-table-column> </el-table-column>
<el-table-column prop="updated_at" label="结束时间" sortable> <el-table-column prop="updated_at" label="结束时间" sortable>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="desc">
</el-table-column>
<el-table-column
label="操作" v-if="!$store.state.readonly" width="220">
<template slot-scope="scope">
<el-button @click="editComment(scope.row.id, scope.row.desc)" size="mini" plain type="primary">编辑备注</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<page :nowPage="nowPage" :total="total" @pageChange="onPageChange" @sizeChange="onSizeChange" /> <page :nowPage="nowPage" :total="total" @pageChange="onPageChange" @sizeChange="onSizeChange" />
<entrance :entranceObj="entranceObj" /> <entrance :entranceObj="entranceObj" />
...@@ -29,8 +56,10 @@ ...@@ -29,8 +56,10 @@
<script> <script>
import entrance from "./entrance"; import entrance from "./entrance";
import { getClassConfigApi } from "../../service/api"; import { getClassConfigApi ,getGoodsListApi,updateDescApi} from "../../service/api";
import page from "../framework/page"; import page from "../framework/page";
import {GOODSTYPE} from "../../util/wordbook";
export default { export default {
name: "notBuyClass", name: "notBuyClass",
...@@ -43,15 +72,27 @@ export default { ...@@ -43,15 +72,27 @@ export default {
entranceObj: { entranceObj: {
title: "无需登录入口", title: "无需登录入口",
show: false show: false
} },
searchFrom:{
user_id:"",
goods_id:"",
},
goodList:[],
}; };
}, },
components: { components: {
entrance, entrance,
page page
}, },
filters:{
filterGoods(val){
return '[' + GOODSTYPE[val.goods_type] + ']' + '[' +val.current_price / 100 + '元]' + val.name
}
},
mounted() { mounted() {
this.getList(); this.getList();
this.getGoodsOption();
}, },
methods: { methods: {
...@@ -69,12 +110,51 @@ export default { ...@@ -69,12 +110,51 @@ export default {
limit: this.limit, limit: this.limit,
page: this.nowPage page: this.nowPage
}; };
// 搜索筛选
if(this.searchFrom.user_id){
json.user_id=this.searchFrom.user_id
}
if(this.searchFrom.goods_id){
json.goods_id=this.searchFrom.goods_id
}
getClassConfigApi(json).then(res => { getClassConfigApi(json).then(res => {
console.log(res); console.log(res);
this.total = res.total; this.total = res.total;
this.configList=res.list; this.configList=res.list;
}); });
} },
getGoodsOption(){
let json = {
page: 1,
limit: 100
};
getGoodsListApi(json).then(res=>{
this.goodList = res.list;
})
},
editComment(id, desc) {
this.$prompt('', '编辑备注', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType:'textarea',
inputValue: desc || ''
}).then(({ value }) => {
this.$confirm('确定保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
console.log(id,value)
updateDescApi({desc: value},id).then(res=>{
this.$message({
type: 'success',
message: '编辑备注成功'
});
this.getList();
});
});
})
},
} }
}; };
</script> </script>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<el-dialog <el-dialog
:title="dialogObj.title" :title="dialogObj.title"
:visible.sync="dialogObj.show" :visible.sync="dialogObj.show"
center
width="800px" width="800px"
> >
<el-form ref="form" :model="form" label-width="120px"> <el-form ref="form" :model="form" label-width="120px">
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="购买时间"> <!-- <el-form-item label="创建时间">
<el-date-picker <el-date-picker
v-model="searchFrom.payTime" v-model="searchFrom.payTime"
unlink-panels unlink-panels
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
end-placeholder="结束日期" end-placeholder="结束日期"
@change="getList"> @change="getList">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item> -->
<el-form-item label="同步时间"> <!-- <el-form-item label="同步时间">
<el-date-picker <el-date-picker
v-model="searchFrom.syncTime" v-model="searchFrom.syncTime"
unlink-panels unlink-panels
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
@change="getList"> @change="getList">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" @click="getList">搜索</el-button> <el-button type="primary" @click="getList">搜索</el-button>
<el-button type="primary" plain @click="exportTable(list)">导出</el-button> <el-button type="primary" plain @click="exportTable(list)">导出</el-button>
...@@ -109,20 +109,21 @@ ...@@ -109,20 +109,21 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="create_time" prop="create_time"
label="购买时间" sortable> label="创建时间" sortable>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="pay_time" prop="pay_time"
label="下单时间" sortable> label="支付时间" sortable>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="buyer_comment" prop="desc"
label="备注" > label="备注" >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="操作" v-if="!$store.state.readonly" > label="操作" v-if="!$store.state.readonly" width="220">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="bindTeacher(scope.row)" size="mini" plain type="success">绑定老师</el-button> <!-- <el-button @click="bindTeacher(scope.row)" size="mini" plain type="success">绑定老师</el-button> -->
<el-button @click="editNote(scope.row.id, scope.row.desc)" size="mini" plain type="primary">编辑备注</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -134,7 +135,7 @@ ...@@ -134,7 +135,7 @@
<script> <script>
import page from '../framework/page' import page from '../framework/page'
import teacherDialog from './dialog' import teacherDialog from './dialog'
import {getyunjiApi,getGoodsListApi,exportExcelApi,getTeacherListApi} from "../../service/api"; import {getyunjiApi,getGoodsListApi,exportExcelApi,getTeacherListApi,orderDescApi} from "../../service/api";
import {GOODSTYPE} from "../../util/wordbook"; import {GOODSTYPE} from "../../util/wordbook";
export default { export default {
name: "smsRecord", name: "smsRecord",
...@@ -267,6 +268,28 @@ ...@@ -267,6 +268,28 @@
id:data.id, id:data.id,
teacher_id: data.teacher_id teacher_id: data.teacher_id
} }
},
editNote(id,desc){
this.$prompt('', '编辑备注', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType:'textarea',
inputValue: desc || ''
}).then(({ value }) => {
this.$confirm('确定保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
orderDescApi({desc: value},id).then(res=>{
this.$message({
type: 'success',
message: '编辑备注成功'
});
this.getList();
});
});
})
}, },
exportTable(data){ exportTable(data){
if(data.length>0){ if(data.length>0){
......
...@@ -778,6 +778,12 @@ const getClassConfigUrl = `/api/admin/user/receive/course/log`; ...@@ -778,6 +778,12 @@ 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 updateDescUrl = `/api/admin/user/receive/course/log/desc/`;
export const updateDescApi = function(json,id) {
return Vue.prototype.$put(`${updateDescUrl}${id}`, json)
}
//短信发送记录 //短信发送记录
const getsmsRecordUrl = `/api/admin/sms/log/list`; const getsmsRecordUrl = `/api/admin/sms/log/list`;
export const getsmsRecordApi = function(json) { export const getsmsRecordApi = function(json) {
...@@ -788,8 +794,15 @@ const getyunjiUrl = `/api/admin/yunji/order`; ...@@ -788,8 +794,15 @@ const getyunjiUrl = `/api/admin/yunji/order`;
export const getyunjiApi = function(json) { export const getyunjiApi = function(json) {
return Vue.prototype.$fetch(`${getyunjiUrl}`, json) return Vue.prototype.$fetch(`${getyunjiUrl}`, json)
} }
//云集绑定老师 //云集绑定老师
const bindTeacherUrl = `/api/admin/yunji/order/bind/teacher/`; const bindTeacherUrl = `/api/admin/yunji/order/bind/teacher/`;
export const bindTeacherApi = function(json,id) { export const bindTeacherApi = function(json,id) {
return Vue.prototype.$put(`${bindTeacherUrl}/${json}/${id}`) return Vue.prototype.$put(`${bindTeacherUrl}${json}/${id}`)
} }
//云集订单备注
const orderDescUrl = `/api/admin/yunji/order/desc/`;
export const orderDescApi = function(json,id) {
return Vue.prototype.$put(`${orderDescUrl}${id}`,json)
}
\ No newline at end of file
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