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

814

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