|
@@ -7,10 +7,10 @@
|
|
|
v-for="item in channeList.list"
|
|
|
:key="item.code"
|
|
|
:label="item.title"
|
|
|
- :value="item.code">
|
|
|
- </el-option>
|
|
|
+ :value="item.code"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
- <el-input v-model="orderParams.userId" placeholder="请输入用户ID"></el-input>
|
|
|
+ <!-- <el-input v-model="orderParams.userId" placeholder="请输入用户ID"></el-input> -->
|
|
|
<el-date-picker
|
|
|
v-model="dateValue"
|
|
|
type="daterange"
|
|
@@ -19,135 +19,138 @@
|
|
|
range-separator="至"
|
|
|
start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期"
|
|
|
- :picker-options="pickerOptions">
|
|
|
- </el-date-picker>
|
|
|
+ :picker-options="pickerOptions"
|
|
|
+ ></el-date-picker>
|
|
|
<el-button type="primary" style="float: right;" @click="search">搜索</el-button>
|
|
|
</div>
|
|
|
- <el-table
|
|
|
- :data="orderList.content"
|
|
|
- style="width: 100%"
|
|
|
- height="700">
|
|
|
- <el-table-column
|
|
|
- label="用户 ID"
|
|
|
- prop="userId">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="订单名称"
|
|
|
- prop="name">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="渠道号"
|
|
|
- prop="channelCode">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="价格"
|
|
|
- prop="price">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="用户手机"
|
|
|
- prop="userPhone">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="订单时间"
|
|
|
- prop="gmtCreated"
|
|
|
- :formatter="formatTime">
|
|
|
- </el-table-column>
|
|
|
+ <el-table :data="orderList" style="width: 100%" height="700">
|
|
|
+ <el-table-column label="日期" prop="day"></el-table-column>
|
|
|
+ <el-table-column label="包名" prop="packageTitle"></el-table-column>
|
|
|
+ <el-table-column label="包月数量" prop="monthlyPayment"></el-table-column>
|
|
|
+ <el-table-column label="续包月数量" prop="consecutiveMonthly"></el-table-column>
|
|
|
+ <el-table-column label="年包数量" prop="yearlyPayment"></el-table-column>
|
|
|
+ <el-table-column label="UV" prop="uv"></el-table-column>
|
|
|
+ <el-table-column label="PV" prop="pv"></el-table-column>
|
|
|
</el-table>
|
|
|
- <el-pagination
|
|
|
+ <!-- <el-pagination
|
|
|
v-if="orderList.totalElements"
|
|
|
background
|
|
|
layout="prev, pager, next"
|
|
|
:total="orderList.totalElements"
|
|
|
@current-change="changePage">
|
|
|
- </el-pagination>
|
|
|
- </el-card>
|
|
|
+ </el-pagination>-->
|
|
|
+ </el-card>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { mapGetters } from 'vuex';
|
|
|
+import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
pickerOptions: {
|
|
|
- shortcuts: [{
|
|
|
- text: '最近一周',
|
|
|
- onClick(picker) {
|
|
|
- const end = new Date();
|
|
|
- const start = new Date();
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
- picker.$emit('pick', [start, end]);
|
|
|
+ shortcuts: [
|
|
|
+ {
|
|
|
+ text: "最近一周",
|
|
|
+ onClick(picker) {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "最近一个月",
|
|
|
+ onClick(picker) {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "最近三个月",
|
|
|
+ onClick(picker) {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
+ picker.$emit("pick", [start, end]);
|
|
|
+ }
|
|
|
}
|
|
|
- }, {
|
|
|
- text: '最近一个月',
|
|
|
- onClick(picker) {
|
|
|
- const end = new Date();
|
|
|
- const start = new Date();
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
- picker.$emit('pick', [start, end]);
|
|
|
- }
|
|
|
- }, {
|
|
|
- text: '最近三个月',
|
|
|
- onClick(picker) {
|
|
|
- const end = new Date();
|
|
|
- const start = new Date();
|
|
|
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
- picker.$emit('pick', [start, end]);
|
|
|
- }
|
|
|
- }]
|
|
|
+ ]
|
|
|
},
|
|
|
- dateValue: '',
|
|
|
+ dateValue: "",
|
|
|
orderParams: {
|
|
|
- userId: '',
|
|
|
- channelCode: '',
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10
|
|
|
+ // userId: '',
|
|
|
+ channelCode: ""
|
|
|
+ // pageNo: 1,
|
|
|
+ // pageSize: 10
|
|
|
},
|
|
|
formatTime: (row, column) => {
|
|
|
let date = new Date(row.gmtCreated);
|
|
|
- let Y = date.getFullYear() + '-';
|
|
|
- let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) + '-' : date.getMonth() + 1 + '-';
|
|
|
- let D = date.getDate() < 10 ? '0' + date.getDate() + ' ' : date.getDate() + ' ';
|
|
|
- let h = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
|
|
|
- let m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':' : date.getMinutes() + ':';
|
|
|
- let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
|
|
|
+ let Y = date.getFullYear() + "-";
|
|
|
+ let M =
|
|
|
+ date.getMonth() + 1 < 10
|
|
|
+ ? "0" + (date.getMonth() + 1) + "-"
|
|
|
+ : date.getMonth() + 1 + "-";
|
|
|
+ let D =
|
|
|
+ date.getDate() < 10
|
|
|
+ ? "0" + date.getDate() + " "
|
|
|
+ : date.getDate() + " ";
|
|
|
+ let h =
|
|
|
+ date.getHours() < 10
|
|
|
+ ? "0" + date.getHours() + ":"
|
|
|
+ : date.getHours() + ":";
|
|
|
+ let m =
|
|
|
+ date.getMinutes() < 10
|
|
|
+ ? "0" + date.getMinutes() + ":"
|
|
|
+ : date.getMinutes() + ":";
|
|
|
+ let s =
|
|
|
+ date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
|
|
|
return Y + M + D + h + m + s;
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ // orderList:[]
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
- channeList: 'channeList',
|
|
|
- orderList: 'orderList'
|
|
|
- })
|
|
|
+ channeList: "channeList",
|
|
|
+ orderList: "orderList"
|
|
|
+ })
|
|
|
},
|
|
|
- created () {
|
|
|
- this.$store.dispatch('getChannelList', {pageNo: '', pageSize: '' })
|
|
|
+ created() {
|
|
|
+ this.$store.dispatch("getChannelList", { pageNo: "", pageSize: "" });
|
|
|
},
|
|
|
methods: {
|
|
|
// 搜索
|
|
|
- search () {
|
|
|
- this.orderParams.startTime = this.dateValue.length > 1 ? this.dateValue[1].toLocaleDateString().replace(/\//g,'-') : ''
|
|
|
- this.orderParams.endTime = this.dateValue.length > 1 ? this.dateValue[1].toLocaleDateString().replace(/\//g,'-') : ''
|
|
|
- this.$store.dispatch('getOrderList', this.orderParams)
|
|
|
+ search() {
|
|
|
+ this.orderParams.startDate =
|
|
|
+ this.dateValue.length > 1
|
|
|
+ ? this.dateValue[0].toLocaleDateString().replace(/\//g, "-")
|
|
|
+ : "";
|
|
|
+ this.orderParams.endDate =
|
|
|
+ this.dateValue.length > 1
|
|
|
+ ? this.dateValue[1].toLocaleDateString().replace(/\//g, "-")
|
|
|
+ : "";
|
|
|
+ this.$store.dispatch("getOrderList", this.orderParams);
|
|
|
},
|
|
|
// 渠道下课程分页
|
|
|
- changePage (e) {
|
|
|
+ changePage(e) {
|
|
|
this.orderParams.pageNo = e;
|
|
|
- this.$store.dispatch('getRelationList', this.orderParams)
|
|
|
+ this.$store.dispatch("getRelationList", this.orderParams);
|
|
|
}
|
|
|
- },
|
|
|
-}
|
|
|
+ }
|
|
|
+};
|
|
|
</script>
|
|
|
<style lang="less">
|
|
|
- .el-pagination {
|
|
|
- text-align: center;
|
|
|
- margin-top: 20px;
|
|
|
- }
|
|
|
- .el-form-item__content {
|
|
|
- width: 50%;
|
|
|
- }
|
|
|
- .el-input {
|
|
|
- width: 217px;
|
|
|
- }
|
|
|
+.el-pagination {
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
+.el-form-item__content {
|
|
|
+ width: 50%;
|
|
|
+}
|
|
|
+.el-input {
|
|
|
+ width: 217px;
|
|
|
+}
|
|
|
</style>
|
|
|
|