| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294 |
- <?php
- $activity_id = Yii::$app->request->getQueryParam('activity_id');
- $activity_id = $activity_id ? $activity_id : 0;
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <div>
- <span>拼团订单</span>
- <div style="float: right; margin: -5px 0">
- <com-export-dialog :field_list='exportList' :params="searchData">
- </com-export-dialog>
- </div>
- </div>
- </div>
- <div class="table-body">
- <el-date-picker
- class="item-box"
- size="small"
- @change="changeTime"
- v-model="searchData.time"
- type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- 会员编号:
- <div class="input-item">
- <el-input @keyup.enter.native="search" size="small" placeholder="用户ID" v-model="searchData.user_id" clearable @clear="search"></el-input>
- </div>
- 会员昵称:
- <div class="input-item">
- <el-input @keyup.enter.native="search" size="small" placeholder="用户昵称" v-model="searchData.nickname" clearable @clear="search"></el-input>
- </div>
- 订单编号:
- <div class="input-item">
- <el-input @keyup.enter.native="search" size="small" placeholder="订单编号" v-model="searchData.order_sn" clearable @clear="search"></el-input>
- </div>
- 拼单状态:
- <el-select size="small" v-model="searchData.status" @change='search' class="select" style="float:none;width: 140px;">
- <el-option key="0" label="请选择拼单状态" value="0"></el-option>
- <el-option key="1" label="参团中" value="1"></el-option>
- <el-option key="2" label="拼团成功" value="2"></el-option>
- <el-option key="3" label="拼团失败" value="3"></el-option>
- </el-select>
- 商品名称:
- <div class="input-item">
- <el-input @keyup.enter.native="search" size="small" placeholder="商品名称" v-model="searchData.goods_name" clearable @clear="search"></el-input>
- </div>
- <div style="display: inline-block;margin-left: 10px;">
- <el-button type="primary" size="small" @click="search">查询</el-button>
- <el-button type="primary" size="small" @click="resetForm" style=" margin-left: 0px;background-color: #ef1818;border-color: #ef1818;">重置</el-button>
- </div>
- <el-table class="table-info" :data="form" stripe style="width: 100%" v-loading="listLoading">
- <el-table-column prop="id" label="ID" width="60" align="center"></el-table-column>
- <el-table-column label="会员" width="180">
- <template slot-scope="scope">
- <div style="display: flex;align-items: center;">
- <com-image style="margin-right: 5px;display: block;flex-shrink: 0;border-radius:5px" mode="aspectFill" :src="scope.row.avatar_url ? scope.row.avatar_url : ''"></com-image>
- <div v-if="scope.row" style="line-height: 18px;">
- <div v-if="scope.row.nickname">{{scope.row.nickname}}</div>
- <div v-else>{{scope.row.username}}</div>
- <div>用户id:{{scope.row.user_id}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="order_sn" label="拼团订单编号" align="center">
- <template slot-scope="scope">{{scope.row.order_sn ? scope.row.order_sn :'--'}}</template>
- </el-table-column>
-
- <el-table-column prop="status" label="拼团状态" width="100" align="center">
- <template slot-scope="scope">{{statusArr[scope.row.status]? statusArr[scope.row.status] :'--'}}</template>
- </el-table-column>
-
- <el-table-column prop="attend_type" label="拼团方式" align="center">
- <template slot-scope="scope">{{attendTypeArr[scope.row.attend_type]? attendTypeArr[scope.row.attend_type] :'--'}}</template>
- </el-table-column>
- <el-table-column prop="pay_money" label="订单金额" align="center"></el-table-column>
- <el-table-column prop="activity_name" label="活动名称" align="center"></el-table-column>
- <el-table-column prop="goods_name" label="商品名称" align="center"></el-table-column>
- <el-table-column prop="buy_nums" label="购买数量" align="center"></el-table-column>
- <el-table-column prop="win_nums" label="中奖数量" align="center"></el-table-column>
- <el-table-column prop="win_time" label="拼中时间" width="160px" align="center">
- <template slot-scope="scope">
- {{scope.row.win_time|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- <el-table-column prop="created_at" label="参团时间" width="160px" align="center">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
-
-
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
- </div>
- </div>
-
- </el-card>
- </div>
- <script>
- var activity_id = <?php echo $activity_id?>;
- const app = new Vue({
- el: '#app',
- data() {
- return {
- searchData: {
- user_id:'',
- nickname:'',
- order_sn:'',
- status:'',
- activity_id:'',
- date_start:'',
- date_end:'',
- },
- status: '0',
- form: [],
- member: [],
- pageCount: 0,
- page: 1,
- member_page: 1,
- currentPage: null,
- listLoading: false,
- btnLoading: false,
- statusArr:[],
- attendTypeArr:[],
- // 导出
- exportList: [],
-
- };
- },
- methods: {
- openId(index) {
- let item = this.form;
- item[index].is_open_id = !item[index].is_open_id;
- this.form = JSON.parse(JSON.stringify(this.form));
- },
- changeTime() {
- if (this.searchData.time) {
- this.searchData.date_start = this.searchData.time[0];
- this.searchData.date_end = this.searchData.time[1];
- } else {
- this.searchData.date_start = null;
- this.searchData.date_end = null;
- }
- },
-
- //搜索
- search() {
- this.page = 1;
- this.getList();
- },
- pagination(currentPage) {
- this.page = currentPage;
- this.getList();
- },
- getList() {
- this.listLoading = true;
- request({
- params: {
- r: 'plugin/lucky_group/mall/bill/order-list',
- page: this.page,
- user_id:this.searchData.user_id,
- nickname:this.searchData.nickname,
- goods_name:this.searchData.goods_name,
- order_sn:this.searchData.order_sn,
- status:this.searchData.status,
- date_start:this.searchData.date_start,
- date_end:this.searchData.date_end,
- activity_id:activity_id,
- pagesize:10
- },
- }).then(e => {
- if (e.data.code === 0) {
- this.form = e.data.data.list;
- this.pageCount = e.data.data.page_count;
- this.currentPage = e.data.data.pagination.current_page;
- this.exportList = e.data.data.exportList;
- this.mall_members = e.data.data.mall_members;
- this.statusArr = e.data.data.statusArr;
- this.attendTypeArr = e.data.data.attendTypeArr;
- } else {
- this.$message.error(e.data.msg);
- }
- this.listLoading = false;
- }).catch(e => {
- this.listLoading = false;
- });
- },
-
-
- //重置
- resetForm() {
- this.searchData.user_id = '';
- this.searchData.nickname = '';
- this.searchData.order_sn = '';
- this.searchData.status = '';
- },
- },
- mounted: function() {
- this.page = getQuery('page') ? getQuery('page') : 1;
- this.getList();
- }
- });
- </script>
- <style>
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- /* .table-info .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- } */
- .input-item {
- display: inline-block;
- width: 150px;
- margin: 0 0 20px;
- }
- .input-item .el-input__inner {
- border-right: 1px solid #dcdfe6;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .select {
- float: left;
- width: 100px;
- margin-right: 10px;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper,
- .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- </style>
|