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,201 +244,207 @@ ...@@ -244,201 +244,207 @@
} 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,
total: 0,
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'];
}
},
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'];
}
},
sourceDialog: {
show: false,
out_trade_no: ""
},
couponDetail: {
show: false,
order_coupon_id: ""
},
refundDetail: {
show: false,
out_trade_no: ""
},
limit: 10,
searchFrom: {
nickname: "",
wait_into_course:'',
user_id: "",
invite_type: "",
invite_id: "",
buy_type: "",
status: [1, 4, 5],
goods_id: "",
out_trade_no: "",
payTime: [],
order_group_id: "",
is_captain:"",
},
tableData: [],
dialogObj: {
show: false
},
refundDialogObj: {
show: false,
id: "",
money: 0
},
dialogDetailObj: {
show: false,
detail: {}
},
goodList: [],
inviteTypeOption: INVITETYPEOPTION,
orderStatusOption: ORDERSTATUSOPTION,
buyTypeOption: BUYTYPEOPTION,
inviteSearchPlaceholder: "",
rules: {
value: [{ required: true, message: "请输入备注", trigger: "change" }]
},
promoterDialog: {
show: false,
nowPage: 1, nowPage: 1,
total: 0, total: 0,
today: { limit: 100,
text: '今天', teacher_id: ""
onClick: () => { },
this.searchFrom.payTime = [this.formatTime(new Date()) + ' 00:00:00', this.formatTime(new Date()) + ' 23:59:59']; teacherList: [],
} loading: false,
}, isLeaderOption:ISLEADEROPTION,
yesterday: { };
text: '昨天', },
onClick: () => { methods: {
let preDate = this.formatTime(new Date(new Date().getTime() - 24 * 60 * 60 * 1000)); periodName(val) {
this.searchFrom.payTime = [preDate + ' 00:00:00', preDate + ' 23:59:59']; let str = '';
} if (!val.periods_title) {
}, str = '-'
last30Day: { } else {
text: '过去30天', if (val.goods_id) {
onClick: () => { str += `【${val.goods_id}】`
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']; if (val.periods_title) {
} str += `${val.periods_title}<br>`
}, }
last7Day: { if (val.watch_num) {
text: '过去7天', str += `${val.watch_num}课时`
onClick: () => { }
let preDate = this.formatTime(new Date(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)); if (val.start_at) {
this.searchFrom.payTime = [preDate + ' 00:00:00', this.formatTime(new Date()) + ' 23:59:59']; str += `(${val.start_at.slice(5).replace('-', '')})`
} }
}, if (val.has_watch_num || val.has_watch_num == 0) {
sourceDialog: { str += `-d${val.has_watch_num}`
show: false, }
out_trade_no: "" }
}, return str
couponDetail: { },
show: false, formatTime(date){
order_coupon_id: "" let year = date.getFullYear();
}, let Month = date.getMonth()+1;
refundDetail: { if(Month < 10){
show: false, Month = `0${Month}`
out_trade_no: "" }
}, let Day = date.getDate();
limit: 10, if(Day<10)Day = `0${Day}`;
searchFrom: { return `${year}-${Month}-${Day}`;
nickname: "", },
wait_into_course: '', showRef(data) {
user_id: "", this.refundDetail.show = true;
invite_type: "", this.refundDetail.out_trade_no = data.out_trade_no;
invite_id: "", },
buy_type: "", showCoupon(data) {
status: [1, 4, 5], this.couponDetail.show = true;
goods_id: "", this.couponDetail.order_coupon_id = data.order_coupon_id;
out_trade_no: "", },
payTime: [], showSource(data) {
order_group_id: "", this.sourceDialog.show = true;
is_captain: "", this.sourceDialog.out_trade_no = data.out_trade_no;
}, },
tableData: [], changeRow(data, b) {
dialogObj: { if (b.indexOf(data) > -1) {
show: false getRefundListApi({ out_trade_no: data.out_trade_no }).then(res => {
}, data.refundList = res.list;
refundDialogObj: { });
show: false, }
id: "", },
money: 0 exportTable() {
}, let json = {
dialogDetailObj: { limit: this.limit,
show: false, page: this.nowPage
detail: {}
},
goodList: [],
inviteTypeOption: INVITETYPEOPTION,
orderStatusOption: ORDERSTATUSOPTION,
buyTypeOption: BUYTYPEOPTION,
inviteSearchPlaceholder: "",
rules: {
value: [{required: true, message: "请输入备注", trigger: "change"}]
},
promoterDialog: {
show: false,
nowPage: 1,
total: 0,
limit: 100,
teacher_id: ""
},
teacherList: [],
loading: false,
isLeaderOption: ISLEADEROPTION,
}; };
if (this.searchFrom.nickname) {
json.nickname = this.searchFrom.nickname;
}
if (this.searchFrom.user_id) {
json.user_id = this.searchFrom.user_id;
}
if (this.searchFrom.invite_type) {
json.invite_type = this.searchFrom.invite_type;
}
if (this.searchFrom.invite_id) {
json.invite_id = this.searchFrom.invite_id;
}
if (this.searchFrom.order_group_id) {
json.order_group_id = this.searchFrom.order_group_id;
}
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.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;
}
if (this.searchFrom.payTime && this.searchFrom.payTime.length > 0) {
json.pay_start_at = this.searchFrom.payTime[0]
json.pay_end_at = this.searchFrom.payTime[1]
}
if (this.searchFrom.wait_into_course) {
json.wait_into_course = this.searchFrom.wait_into_course
}
json.course_type = 1; //日课
exportExcelApi("/api/admin/order/export", json,'日课订单列表');
}, },
methods: { getGoodsOption() {
periodName(val) { let json = {
let str = ''; page: 1,
if (!val.periods_title) { limit: 100,
str = '-' course_type:1,
} else { status:"1,2"
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
},
formatTime(date) {
let year = date.getFullYear();
let Month = date.getMonth() + 1;
if (Month < 10) {
Month = `0${Month}`
}
let Day = date.getDate();
if (Day < 10) Day = `0${Day}`;
return `${year}-${Month}-${Day}`;
},
showRef(data) {
this.refundDetail.show = true;
this.refundDetail.out_trade_no = data.out_trade_no;
},
showCoupon(data) {
this.couponDetail.show = true;
this.couponDetail.order_coupon_id = data.order_coupon_id;
},
showSource(data) {
this.sourceDialog.show = true;
this.sourceDialog.out_trade_no = data.out_trade_no;
},
changeRow(data, b) {
if (b.indexOf(data) > -1) {
getRefundListApi({out_trade_no: data.out_trade_no}).then(res => {
data.refundList = res.list;
});
}
},
exportTable() {
let json = {};
if (this.searchFrom.nickname) {
json.nickname = this.searchFrom.nickname;
}
if (this.searchFrom.user_id) {
json.user_id = this.searchFrom.user_id;
}
if (this.searchFrom.invite_type) {
json.invite_type = this.searchFrom.invite_type;
}
if (this.searchFrom.invite_id) {
json.invite_id = this.searchFrom.invite_id;
}
if (this.searchFrom.order_group_id) {
json.order_group_id = this.searchFrom.order_group_id;
}
if (this.searchFrom.buy_type) {
json.buy_type = this.searchFrom.buy_type;
}
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.receive_mobile) {
json.receive_mobile = this.searchFrom.receive_mobile;
}
if (this.searchFrom.payTime && this.searchFrom.payTime.length > 0) {
json.pay_start_at = this.searchFrom.payTime[0]
json.pay_end_at = this.searchFrom.payTime[1]
}
if (this.searchFrom.wait_into_course) {
json.wait_into_course = this.searchFrom.wait_into_course
}
json.course_type = 1; //日课
exportExcelApi("/api/admin/order/export", json, '日课订单列表');
},
getGoodsOption() {
let json = {
page: 1,
limit: 100,
course_type: 1,
status: "1,2"
};
getGoodsListApi(json).then(res => { getGoodsListApi(json).then(res => {
this.goodList = res.list; this.goodList = res.list;
......
...@@ -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