Commit d2998d1b authored by chenfenglei's avatar chenfenglei

云集添加备注,扫码备注

parent ba8c1a61
......@@ -298,7 +298,8 @@
show:true,
goods_id:this.goods_id,
title:`${data.teacher_name}班级用户列表`,
teacherId: data.teacher_id
teacherId: data.teacher_id,
class_name:data.class_name
}
},
getTeacher(){
......
......@@ -579,7 +579,26 @@
this.changeClassObj.periods_list = res.list
});
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){
this.selectUserList = a
......
......@@ -95,8 +95,7 @@
});
getConfigListApi({key:this.searchFrom2.key}).then(res=>{
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)
}else{
this.searchFrom2.value = '';
......
<template>
<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">
<el-button plain type="success" style="float: right;margin-bottom:20px;" v-if="!$store.state.readonly" @click="entranceObj.show=true">无需登录入口</el-button>
</div>
......@@ -21,6 +40,14 @@
</el-table-column>
<el-table-column prop="updated_at" label="结束时间" sortable>
</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>
<page :nowPage="nowPage" :total="total" @pageChange="onPageChange" @sizeChange="onSizeChange" />
<entrance :entranceObj="entranceObj" />
......@@ -29,8 +56,10 @@
<script>
import entrance from "./entrance";
import { getClassConfigApi } from "../../service/api";
import { getClassConfigApi ,getGoodsListApi,updateDescApi} from "../../service/api";
import page from "../framework/page";
import {GOODSTYPE} from "../../util/wordbook";
export default {
name: "notBuyClass",
......@@ -43,15 +72,27 @@ export default {
entranceObj: {
title: "无需登录入口",
show: false
}
},
searchFrom:{
user_id:"",
goods_id:"",
},
goodList:[],
};
},
components: {
entrance,
page
},
filters:{
filterGoods(val){
return '[' + GOODSTYPE[val.goods_type] + ']' + '[' +val.current_price / 100 + '元]' + val.name
}
},
mounted() {
this.getList();
this.getGoodsOption();
},
methods: {
......@@ -69,12 +110,51 @@ export default {
limit: this.limit,
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 => {
console.log(res);
this.total = res.total;
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>
......
......@@ -2,6 +2,7 @@
<el-dialog
:title="dialogObj.title"
:visible.sync="dialogObj.show"
center
width="800px"
>
<el-form ref="form" :model="form" label-width="120px">
......
......@@ -37,7 +37,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="购买时间">
<!-- <el-form-item label="创建时间">
<el-date-picker
v-model="searchFrom.payTime"
unlink-panels
......@@ -48,8 +48,8 @@
end-placeholder="结束日期"
@change="getList">
</el-date-picker>
</el-form-item>
<el-form-item label="同步时间">
</el-form-item> -->
<!-- <el-form-item label="同步时间">
<el-date-picker
v-model="searchFrom.syncTime"
unlink-panels
......@@ -60,7 +60,7 @@
end-placeholder="结束日期"
@change="getList">
</el-date-picker>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="getList">搜索</el-button>
<el-button type="primary" plain @click="exportTable(list)">导出</el-button>
......@@ -109,20 +109,21 @@
</el-table-column>
<el-table-column
prop="create_time"
label="购买时间" sortable>
label="创建时间" sortable>
</el-table-column>
<el-table-column
prop="pay_time"
label="下单时间" sortable>
label="支付时间" sortable>
</el-table-column>
<el-table-column
prop="buyer_comment"
prop="desc"
label="备注" >
</el-table-column>
<el-table-column
label="操作" v-if="!$store.state.readonly" >
label="操作" v-if="!$store.state.readonly" width="220">
<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>
</el-table-column>
</el-table>
......@@ -134,7 +135,7 @@
<script>
import page from '../framework/page'
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";
export default {
name: "smsRecord",
......@@ -267,6 +268,28 @@
id:data.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){
if(data.length>0){
......
......@@ -778,6 +778,12 @@ const getClassConfigUrl = `/api/admin/user/receive/course/log`;
export const getClassConfigApi = function(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`;
export const getsmsRecordApi = function(json) {
......@@ -788,8 +794,15 @@ const getyunjiUrl = `/api/admin/yunji/order`;
export const getyunjiApi = function(json) {
return Vue.prototype.$fetch(`${getyunjiUrl}`, json)
}
//云集绑定老师
const bindTeacherUrl = `/api/admin/yunji/order/bind/teacher/`;
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