Commit da755988 authored by chenyishuai@singsingenglish.com's avatar chenyishuai@singsingenglish.com

814

parents cade2375 230fd530
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<script src="https://lib.baomitu.com/vue/2.5.17/vue.js"></script> <script src="https://lib.baomitu.com/vue/2.5.17/vue.js"></script>
<script src="https://lib.baomitu.com/vuex/3.0.1/vuex.min.js"></script> <script src="https://lib.baomitu.com/vuex/3.0.1/vuex.min.js"></script>
<!-- 引入组件库 --> <!-- 引入组件库 -->
<script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script> <script src="https://lib.baomitu.com/axios/0.18.0/axios.min.js"></script>
<script src="https://lib.baomitu.com/element-ui/2.11.1/index.js"></script> <script src="https://lib.baomitu.com/element-ui/2.11.1/index.js"></script>
<div id="app"></div> <div id="app"></div>
</body> </body>
......
...@@ -92,9 +92,13 @@ ...@@ -92,9 +92,13 @@
:data="list" :data="list"
@sort-change="sortMethod" @sort-change="sortMethod"
:style="{width: width+'px'}" :style="{width: width+'px'}"
fixed fixed>
> <!--<el-table-column prop="periods_title" label="期数名称"></el-table-column>-->
<el-table-column prop="periods_title" label="期数名称"></el-table-column> <el-table-column prop="periods_title" label="期数名称" width="170px">
<template slot-scope="scope">
<div v-html="periodName(scope.row)"></div>
</template>
</el-table-column>
<el-table-column <el-table-column
prop="duration_over_at" prop="duration_over_at"
label="开课看课时间" label="开课看课时间"
...@@ -281,6 +285,29 @@ export default { ...@@ -281,6 +285,29 @@ export default {
}, },
components: { page }, components: { page },
methods: { methods: {
periodName(val) {
let str = '';
if (!val.periods_title) {
str = '-'
} else {
if (val.goods_id) {
str += `【${val.goods_id}】`
}
if (val.periods_title) {
str += `${val.periods_title}<br>`
}
if (val.watch_num) {
str += `${val.watch_num}课时`
}
if (val.start_at) {
str += `(${val.start_at.slice(5).replace('-', '')})`
}
if (val.has_watch_num || val.has_watch_num == 0) {
str += `-d${val.has_watch_num}`
}
}
return str
},
rendertip(h, { column }) { rendertip(h, { column }) {
// console.log(h) // console.log(h)
return h("span", [ return h("span", [
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<el-button type="primary" plain @click="exportTable" v-if="$store.state.export">导出当前待发货</el-button> <el-button type="primary" plain @click="exportTable" v-if="$store.state.export">导出当前待发货</el-button>
<el-button type="primary" plain @click="exportReceiveInfoTable">按期数导出收货信息</el-button> <el-button type="primary" plain @click="exportReceiveInfoTable">按期数导出收货信息</el-button>
</el-form-item> </el-form-item>
<el-form-item v-if="$store.state.export"> <el-form-item v-if="$store.state.import">
<el-upload <el-upload
:show-file-list="false" :show-file-list="false"
:onSuccess="fileSuccess" :onSuccess="fileSuccess"
...@@ -433,6 +433,9 @@ export default { ...@@ -433,6 +433,9 @@ export default {
</script> </script>
<style scoped> <style scoped>
.sms {
padding: 20px 0;
}
.el-button + .el-button { .el-button + .el-button {
margin-left: 0; margin-left: 0;
/* margin-top: 10px; */ /* margin-top: 10px; */
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
<template slot-scope="scope"> <template slot-scope="scope">
<img class="avatar" :src="scope.row.avatar"> <img class="avatar" :src="scope.row.avatar">
{{scope.row.nickname}}(ID:{{scope.row.user_id}}) {{scope.row.nickname}}(ID:{{scope.row.user_id}})
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="class_name" label="班级名称"></el-table-column> <el-table-column prop="class_name" label="班级名称"></el-table-column>
......
...@@ -244,37 +244,37 @@ ...@@ -244,37 +244,37 @@
} from "../../util/wordbook"; } from "../../util/wordbook";
import CommonJs from "../../util/common"; import CommonJs from "../../util/common";
export default { export default {
name: "index", name: "index",
data() { data() {
return { return {
nowPage: 1, nowPage: 1,
total: 0, total: 0,
today: { today:{
text: '今天', text:'今天',
onClick: () => { onClick:()=>{
this.searchFrom.payTime = [this.formatTime(new Date()) + ' 00:00:00', this.formatTime(new Date()) + ' 23:59:59']; this.searchFrom.payTime = [this.formatTime(new Date())+' 00:00:00',this.formatTime(new Date())+' 23:59:59'];
} }
}, },
yesterday: { yesterday:{
text: '昨天', text:'昨天',
onClick: () => { onClick:()=>{
let preDate = this.formatTime(new Date(new Date().getTime() - 24 * 60 * 60 * 1000)); let preDate = this.formatTime(new Date(new Date().getTime() - 24*60*60*1000));
this.searchFrom.payTime = [preDate + ' 00:00:00', preDate + ' 23:59:59']; this.searchFrom.payTime = [preDate+' 00:00:00',preDate+' 23:59:59'];
} }
}, },
last30Day: { last30Day:{
text: '过去30天', text:'过去30天',
onClick: () => { onClick:()=>{
let preDate = this.formatTime(new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000)); let preDate = this.formatTime(new Date(new Date().getTime() - 30*24*60*60*1000));
this.searchFrom.payTime = [preDate + ' 00:00:00', this.formatTime(new Date()) + ' 23:59:59']; this.searchFrom.payTime = [preDate+' 00:00:00',this.formatTime(new Date())+' 23:59:59'];
} }
}, },
last7Day: { last7Day:{
text: '过去7天', text:'过去7天',
onClick: () => { onClick:()=>{
let preDate = this.formatTime(new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)); let preDate = this.formatTime(new Date(new Date().getTime() - 7*24*60*60*1000));
this.searchFrom.payTime = [preDate + ' 00:00:00', this.formatTime(new Date()) + ' 23:59:59']; this.searchFrom.payTime = [preDate+' 00:00:00',this.formatTime(new Date())+' 23:59:59'];
} }
}, },
sourceDialog: { sourceDialog: {
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
limit: 10, limit: 10,
searchFrom: { searchFrom: {
nickname: "", nickname: "",
wait_into_course: '', wait_into_course:'',
user_id: "", user_id: "",
invite_type: "", invite_type: "",
invite_id: "", invite_id: "",
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
out_trade_no: "", out_trade_no: "",
payTime: [], payTime: [],
order_group_id: "", order_group_id: "",
is_captain: "", is_captain:"",
}, },
tableData: [], tableData: [],
dialogObj: { dialogObj: {
...@@ -323,7 +323,7 @@ ...@@ -323,7 +323,7 @@
buyTypeOption: BUYTYPEOPTION, buyTypeOption: BUYTYPEOPTION,
inviteSearchPlaceholder: "", inviteSearchPlaceholder: "",
rules: { rules: {
value: [{required: true, message: "请输入备注", trigger: "change"}] value: [{ required: true, message: "请输入备注", trigger: "change" }]
}, },
promoterDialog: { promoterDialog: {
show: false, show: false,
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
}, },
teacherList: [], teacherList: [],
loading: false, loading: false,
isLeaderOption: ISLEADEROPTION, isLeaderOption:ISLEADEROPTION,
}; };
}, },
methods: { methods: {
...@@ -361,14 +361,14 @@ ...@@ -361,14 +361,14 @@
} }
return str return str
}, },
formatTime(date) { formatTime(date){
let year = date.getFullYear(); let year = date.getFullYear();
let Month = date.getMonth() + 1; let Month = date.getMonth()+1;
if (Month < 10) { if(Month < 10){
Month = `0${Month}` Month = `0${Month}`
} }
let Day = date.getDate(); let Day = date.getDate();
if (Day < 10) Day = `0${Day}`; if(Day<10)Day = `0${Day}`;
return `${year}-${Month}-${Day}`; return `${year}-${Month}-${Day}`;
}, },
showRef(data) { showRef(data) {
...@@ -385,13 +385,16 @@ ...@@ -385,13 +385,16 @@
}, },
changeRow(data, b) { changeRow(data, b) {
if (b.indexOf(data) > -1) { if (b.indexOf(data) > -1) {
getRefundListApi({out_trade_no: data.out_trade_no}).then(res => { getRefundListApi({ out_trade_no: data.out_trade_no }).then(res => {
data.refundList = res.list; data.refundList = res.list;
}); });
} }
}, },
exportTable() { exportTable() {
let json = {}; let json = {
limit: this.limit,
page: this.nowPage
};
if (this.searchFrom.nickname) { if (this.searchFrom.nickname) {
json.nickname = this.searchFrom.nickname; json.nickname = this.searchFrom.nickname;
} }
...@@ -410,15 +413,18 @@ ...@@ -410,15 +413,18 @@
if (this.searchFrom.buy_type) { if (this.searchFrom.buy_type) {
json.buy_type = this.searchFrom.buy_type; json.buy_type = this.searchFrom.buy_type;
} }
if (this.searchFrom.status) {
json.status = this.searchFrom.status.toString();
}
if (this.searchFrom.goods_id) { if (this.searchFrom.goods_id) {
json.goods_id = this.searchFrom.goods_id; json.goods_id = this.searchFrom.goods_id;
} }
if (this.searchFrom.out_trade_no) {
json.out_trade_no = this.searchFrom.out_trade_no;
}
if (this.searchFrom.is_captain || this.searchFrom.is_captain == 0) { if (this.searchFrom.is_captain || this.searchFrom.is_captain == 0) {
json.is_captain = this.searchFrom.is_captain; json.is_captain = this.searchFrom.is_captain;
} }
if (this.searchFrom.out_trade_no) {
json.out_trade_no = this.searchFrom.out_trade_no;
}
if (this.searchFrom.receive_mobile) { if (this.searchFrom.receive_mobile) {
json.receive_mobile = this.searchFrom.receive_mobile; json.receive_mobile = this.searchFrom.receive_mobile;
} }
...@@ -430,14 +436,14 @@ ...@@ -430,14 +436,14 @@
json.wait_into_course = this.searchFrom.wait_into_course json.wait_into_course = this.searchFrom.wait_into_course
} }
json.course_type = 1; //日课 json.course_type = 1; //日课
exportExcelApi("/api/admin/order/export", json, '日课订单列表'); exportExcelApi("/api/admin/order/export", json,'日课订单列表');
}, },
getGoodsOption() { getGoodsOption() {
let json = { let json = {
page: 1, page: 1,
limit: 100, limit: 100,
course_type: 1, course_type:1,
status: "1,2" status:"1,2"
}; };
getGoodsListApi(json).then(res => { getGoodsListApi(json).then(res => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="periods"> <div class="periods">
<div class="form-block"> <div class="form-block">
<el-form label-width="85px" inline size="small"> <el-form label-width="85px" inline size="small">
<el-form-item label="期数标题"> <el-form-item label="期数名称">
<el-input v-model="title" placeholder="请输入内容" style="width: 150px" clearable></el-input> <el-input v-model="title" placeholder="请输入内容" style="width: 150px" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品名称"> <el-form-item label="商品名称">
...@@ -98,25 +98,19 @@ ...@@ -98,25 +98,19 @@
</el-table> </el-table>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="期数名称" width="150px">
label="期数标题">
<template slot-scope="scope"> <template slot-scope="scope">
<router-link :to="{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.id}}" > <router-link :to="{name:'class', query: { goods_id: scope.row.goods_id, periods_id: scope.row.id}}" >
{{scope.row.title}} <div v-html="periodName(scope.row)"></div>
</router-link> </router-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="goods_name" label="商品名称">
prop="goods_name"
label="商品名称">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.goods_price/ 100 }}元】{{scope.row.goods_name}} {{scope.row.goods_price/ 100 }}元】{{scope.row.goods_name}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="course_title" label="课程名称"></el-table-column>
prop="course_title"
label="课程名称">
</el-table-column>
<el-table-column <el-table-column
prop="start_name" prop="start_name"
label="开始主题/歌"> label="开始主题/歌">
...@@ -242,6 +236,29 @@ ...@@ -242,6 +236,29 @@
page page
}, },
methods: { methods: {
periodName(val) {
let str = '';
if (!val.title) {
str = '-'
} else {
if (val.goods_id) {
str += `【${val.goods_id}】`
}
if (val.title) {
str += `${val.title}<br>`
}
if (val.watch_num) {
str += `${val.watch_num}课时`
}
if (val.start_at) {
str += `(${val.start_at.slice(5).replace('-', '')})`
}
if (val.has_watch_num || val.has_watch_num == 0) {
str += `-d${val.has_watch_num}`
}
}
return str
},
rendertip(h, { column }) { rendertip(h, { column }) {
// common.tipFilter(h,column,tipArr2) // common.tipFilter(h,column,tipArr2)
return h("span", [ return h("span", [
......
<template> <template>
<div class="admin-refresh" v-loading="loading"> <div class="admin-refresh" v-loading="loading">
<div class="section-search search-single"> <div class="section-search search-single">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item> <el-form-item>
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="tag-tree"> <div class="tag-tree">
<el-tree <el-tree
:data="treeData" :data="treeData"
......
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