<template> <div class="usersList"> <div class="head-title"> 用户购买记录 <el-button @click="dialogVisible=true" style="float:right;margin-top: -5px;" size="small" type="primary">批量导出</el-button> </div> <div class="content"> <div> <el-date-picker size="small" v-model="value" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker> <div style="margin-left:20px" class="searchInput"> <el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入内容" v-model="value" size="small" clearable> </el-input> <span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"></span> </div> </div> <el-table v-loading="loading" :data="tableData" border style="width: 100%;margin:20px 0"> <el-table-column prop="ID" label="ID"> </el-table-column> <el-table-column prop="address" width="280" label="订单号"> <template slot-scope="scope"> <div class="app-image" style="background-image: url('https://wx.qlogo.cn/mmopen/vi_32/HO8Q9ibH7UtSFzHs67f0MH6VWjftiboELYLBya5OxpZkHDlicLMq39gxRHS4NhOG1AUepQ13JdUyrT7eM52u6hAsg/132'); background-size: cover; background-position: center center; width: 50px; height: 50px; border-radius: 0%; float: left; margin-right: 8px;"></div> <div flex="dir:left cross:center">易飞易&港中旅小李15351281772</div> <img style="width:24px;height:24px" src="../../assets/img/userman/wx.png" alt="" class="platform-img"> <button type="button" class="el-button el-button--success" style="float: right; padding: 5px !important;"> <span>显示OpenId</span> </button> <div>ow_7I5dE_g9Fe1BuBPKdk8RNtEj0</div> </template> </el-table-column> <el-table-column prop="name" label="昵称"> </el-table-column> <el-table-column prop="name" label="支付金额"> </el-table-column> <el-table-column prop="name" label="购买情况"> <template slot-scope="scope"> <span class="blue">0</span> </template> </el-table-column> <el-table-column prop="name" label="支付时间"> <template slot-scope="scope"> <span class="blue">0</span> </template> </el-table-column> </el-table> <el-pagination style="text-align:right" background @current-change="handleCurrentChange" :page-size="msg.pageSize" layout="prev, pager, next" :total="total"> </el-pagination> </div> <!-- 选择导出信息 --> <el-dialog title="选择导出信息" :visible.sync="dialogVisible" width="960px"> <el-form style="border: 1px solid #F0F2F7;" :model="addMsg" ref="addMsg" label-width="100px"> <div style="box-sizing: border-box;background-color: #F3F5F6;width: 100%;padding-left: 20px;height: 50px;line-height: 50px;"> <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox> </div> <div style="margin: 15px 0;"></div> <div style="padding: 10px 25px 20px;"> <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange"> <el-checkbox style="margin-bottom:10px" v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox> </el-checkbox-group> </div> </el-form> <div style="text-align:right;margin-top:20px"> <el-button size="small" type="primary" @click="dialogVisible = false">导出</el-button> </div> </el-dialog> </div> </template> <script> export default { data() { return { loading:false, checkAll: false, checkedCities: ['上海', '北京'], cities: ['上海', '北京', '广州', '深圳'], cityOptions: ['上海', '北京', '广州', '深圳'], isIndeterminate: true, addMsg:{}, dialogVisible:false, value:'', options:[], tableData:[ {ID:'111'} ], msg:{ pageIndex:1, pageSize:15, }, total:0, }; }, created() { }, methods: { handleCheckAllChange(val) { this.checkedCities = val ? this.cityOptions : []; this.isIndeterminate = false; }, handleCheckedCitiesChange(value) { let checkedCount = value.length; this.checkAll = checkedCount === this.cities.length; this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length; }, handleCurrentChange(val) { this.msg.pageIndex = val; this.getList(); }, getList(){ this.loading=true; }, }, mounted() { } }; </script> <style> .usersList .blue{ color:#409EFF; } .usersList .content .searchInput{ border: 1px solid #DCDFE6; border-radius: 4px; } .usersList .content .searchInput .el-input__inner{ border:none;outline:none; height: 30px; line-height: 30px; } .usersList .content .searchInput{ line-height: normal; display: inline-table; width: 100%; border-collapse: separate; border-spacing: 0; width:250px; margin-right: 20px; } .usersList .content{ background: #fff; margin-top:10px; padding: 20px; box-sizing: border-box; } </style>