123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- <template>
- <div class="subPage">
- <div class="system-table-search">
- <div class="flex-h">
- <ul class="searchFilterLine" style="white-space: normal;">
- <li>
- <el-select v-model="postData.caseid" placeholder="请选择案场">
- <el-option
- v-for="item in cases"
- :key="item.CaseId"
- :label="item.CaseName"
- :value="item.CaseId">
- </el-option>
- </el-select>
- </li>
- <li>
- <el-select v-model="postData.typeid" placeholder="请选择课程类别">
- <el-option
- v-for="item in courseTypeList"
- :key="item.LocationId"
- :label="item.LocationName"
- :value="item.LocationId">
- </el-option>
- </el-select>
- </li>
- <li>
- <el-input
- placeholder="请输入课程活动名称"
- v-model="postData.name"
- clearable>
- </el-input>
- </li>
- <li style="white-space: nowrap;">
- <span>下单时间:</span>
- <el-date-picker
- value-format="yyyy-MM-dd"
- v-model="postData.begindate"
- type="date"
- placeholder="选择起始日期">
- </el-date-picker>
- <span>至</span>
- <el-date-picker
- value-format="yyyy-MM-dd"
- v-model="postData.enddate"
- type="date"
- placeholder="选择截止日期">
- </el-date-picker>
- </li>
- </ul>
- </div>
- <div class="flex-h">
- <div class="flex-item flex-h"></div>
- <el-button
- size="mini"
- type="primary" @click="search">搜索</el-button>
- <el-button
- size="mini"
- type="success" @click="exportExcel">导出Excel</el-button>
- </div>
- <div class="moreFilter"></div>
- </div>
- <div class="system-table-box">
- <el-table
- :data="courseOrderList"
- stripe
- style="width: 100%">
- <el-table-column
- prop="OrdersNo"
- label="订单编号">
- </el-table-column>
- <el-table-column
- prop="CourseName"
- label="课程名称">
- </el-table-column>
- <el-table-column
- prop="CaseName"
- label="所属案场">
- </el-table-column>
- <el-table-column
- prop="LocationName"
- label="课程类别">
- </el-table-column>
- <el-table-column
- prop="BeginDate"
- label="课程时间"
- width="140px">
- <template slot-scope="scope">
- {{scope.row.BeginDate === '0001-01-01T00:00:00Z' ? '-' : toolClass.dateFormat(scope.row.BeginDate)}}<br>
- -<br>
- {{scope.row.EndDate === '0001-01-01T00:00:00Z' ? '-' : toolClass.dateFormat(scope.row.EndDate)}}
- </template>
- </el-table-column>
- <el-table-column
- prop="CustomerName"
- label="用户姓名">
- </el-table-column>
- <el-table-column
- prop="Name"
- label="微信昵称">
- </el-table-column>
- <el-table-column
- prop="Phone"
- label="手机号">
- </el-table-column>
- <el-table-column
- prop="CreateDate"
- label="下单时间"
- width="140px">
- <template slot-scope="scope">
- {{scope.row.CreateDate === '0001-01-01T00:00:00Z' ? '-' : toolClass.dateFormat(scope.row.CreateDate)}}
- </template>
- </el-table-column>
- </el-table>
- </div>
- <el-pagination
- @current-change="handleCurrentChange"
- :current-page.sync="postData.page"
- :page-size="postData.pagesize"
- layout="prev, pager, next, jumper"
- :total="total">
- </el-pagination>
- </div>
- </template>
-
- <script>
- import { mapState, createNamespacedHelpers } from 'vuex'
- import tableSearch from '@/components/tableSearch/index'
- const { mapState: mapStaState, mapActions: mapStaActions } = createNamespacedHelpers('sta')
- const { mapState: mapCmsState, mapActions: mapCmsActions } = createNamespacedHelpers('cms')
-
- export default {
- name: '',
- data () {
- return {
- total: 0,
- postData: {
- caseid: '',
- typeid: '',
- begindate: '',
- enddate: '',
- name: '',
- page: 1,
- pagesize: 10,
- },
- currentList: [],
- typeList: [],
- statusList: [],
- }
- },
- computed: {
- ...mapState({
- cases: x => x.app.cases.list,
- defaultCaseId: x => x.app.cases.default
- }),
- ...mapStaState({
- courseOrderList: x => x.courseOrder.list || [],
- }),
- ...mapCmsState({
- courseTypeList: x => x.location || [],
- }),
- CaseId: {
- get () {
- return this.postData.caseid || this.defaultCaseId
- },
- set (val) {
- this.postData.caseid = val
- }
- }
- },
- components: {
- tableSearch,
- },
- mounted () {
- this.$nextTick(function () {
- this.updateLocationInfo().then((res) => {
-
- })
- this.getList()
- })
- },
- methods: {
- ...mapCmsActions([
- 'updateLocationInfo',
- ]),
- ...mapStaActions([
- 'getCourseOrderList',
- ]),
- search () {
- this.page = 1
- this.getList()
- },
- handleCurrentChange (val) {
- this.page = val
- this.getList()
- },
- getList () {
- this.getCourseOrderList(this.postData).then((res) => {
-
- this.postData.page = res.page
- this.total = res.pagenum
- })
- },
- exportExcel () {
- window.location.href = `${this.toolClass.ReplaceOrg(this.$api.statistics.courseOrderExcel.url)}?token=${localStorage.getItem('JWT')}`
- },
- }
- }
- </script>
-
-
- <style lang="scss" scoped>
- @import "page.scss";
- .searchFilterLine{
- >li{
- margin-bottom: 20px;
- }
- }
- </style>
|