| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421 |
- <?php
- /**
- * @link:http://www.goodmall.com/
- * @copyright: Copyright (c) 2020
- * 名片
- * Author: james
- * Date: 2020-07-10
- * Time: 15:48
- */
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 1200px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <span>订单管理</span>
- <div style="float: right; margin: -5px 0">
- <el-button type="primary" size="small" @click="onEdit()">代客下单</el-button>
- </div>
- </div>
- <el-row :gutter="10" style="margin-bottom: 10px;">
- <el-col :span="12">
- <el-card shadow="never">
- <template #header>
- <strong>
- 订单总数量(笔)
- </strong>
- </template>
- <template>
- <div>
- <strong class="text-danger" style="font-size: 32px">{{pagination.totalCount}}</strong><span class="text-info" style="font-size: 12px; margin-left: 5px">笔</span>
- </div>
- </template>
- </el-card>
- </el-col>
- <el-col :span="12">
- <el-card shadow="never">
- <template #header>
- <strong>
- 订单总金额(元)
- </strong>
- </template>
- <template>
- <div>
- <span class="text-info" style="font-size: 12px;">¥</span><strong class="text-danger" style="font-size: 32px">{{totalAmount | amount}}</strong><span class="text-info" style="font-size: 12px; margin-left: 5px">元</span>
- </div>
- </template>
- </el-card>
- </el-col>
- </el-row>
- <div class="table-body">
- <el-form size="small" :inline="true">
- <el-form-item>
- <el-date-picker size="small" v-model="searchForm.date" type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
- @change="selectDateTime" end-placeholder="结束日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item>
- <el-input placeholder="请输入下单用户ID进行搜索" v-model="searchForm.buy_user_id" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-input placeholder="请输入下单用户昵称/手机号码进行搜索" v-model="searchForm.buy_user" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-input placeholder="请输入被下单用户ID进行搜索" v-model="searchForm.user_id" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-input placeholder="请输入被下单用户昵称/手机号码进行搜索" v-model="searchForm.user" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-input placeholder="请输入商品名称进行搜索" v-model="searchForm.goods_name" clearable></el-input>
- </el-form-item>
- <el-form-item>
- <el-button size="small" type="primary" style="padding: 9px 15px !important;" @click="onSearch">搜索</el-button>
- </el-form-item>
- <el-form-item>
- <el-button size="small" type="danger" style="padding: 9px 15px !important;" @click="onResetSearch">重置</el-button>
- </el-form-item>
- </el-form>
- <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;"
- @selection-change="handleSelectionChange">
- <el-table-column label="下单人ID" prop="buy_user_id" width="120" align="center"></el-table-column>
- <el-table-column label="下单人信息" width="200" align="center">
- <template slot-scope="scope">
- <div class="table-info-img-text" style="text-align: left">
- <el-image class="table-info-img circle" :src="scope.row.buyUser.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000;">{{scope.row.buyUser.nickname}}</div>
- <div style="font-size: 12px;">{{scope.row.buyUser.mobile}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="被下单人ID" prop="user_id" width="120" align="center"></el-table-column>
- <el-table-column label="被下单人信息" width="200" align="center">
- <template slot-scope="scope">
- <div class="table-info-img-text" style="text-align: left">
- <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000;">{{scope.row.user.nickname}}</div>
- <div style="font-size: 12px;">{{scope.row.user.mobile}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="订单编号" prop="order_no" align="center">
- <template slot-scope="scope">
- <el-tooltip class="item" effect="dark" content="查看订单详情" placement="top">
- <a @click="goOrderDetail(scope.row)" href="javascript:;" style="color: #333333">{{scope.row.order_no}}</a>
- </el-tooltip>
- </template>
- </el-table-column>
- <el-table-column label="商品信息" align="center">
- <template slot-scope="scope">
- <div class="table-info-img-text" style="text-align: left">
- <el-image class="table-info-img circle" :src="scope.row.order.detail[0].pic_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000;">{{scope.row.order.detail[0].goods_name}}</div>
- <div style="font-size: 12px;">规格:{{scope.row.order.detail[0].goods_attr_name ? scope.row.order.detail[0].goods_attr_name : '-'}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="订单金额" prop="award_money" width="120" align="center">
- <template slot-scope="scope">
- <div>¥<strong class="text-danger">{{scope.row.order_amount | amount}}</strong></div>
- </template>
- </el-table-column>
- <el-table-column label="下单时间" prop="award_money" width="150" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- </template>
- </el-table-column>
- </el-table>
- <!-- 分页器 -->
- <div flex="box:last cross:center">
- <div></div>
- <div>
- <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
- style="display: inline-block;float: right;" background @current-change="pageChange"
- layout="prev, pager, next" :total="pagination.totalCount">
- </el-pagination>
- </div>
- </div>
- </div>
- <!-- 这个是复制用的容器,已隐藏 -->
- <textarea id="inputs" style="opacity: 0;width: 0;height: 0;">这是幕后黑手</textarea>
- </el-card>
- </div>
- <script>
- new Vue({
- el: '#app',
- data: {
- page:1,
- avatar: '',
- nickname: '',
- time:[], //本地存时间,请求时不发送
- searchForm: {
- user_id: '',
- start_date: '',
- end_date: '',
- buy_user_id: '',
- buy_user: '',
- user: '',
- goods_name: ''
- },
- loading: false,
- activeName: '-1',
- list: [], //列表数据
- sum: {
- award_money:0,
- award_user:0,
- grant_num:0,
- },
- pagination: {
- totalCount: 0
- },
- totalAmount: 0
- },
- mounted() {
- // 获取列表首页数据
- this.loadData(1); //获取列表数据
- },
- filters: {
- amount: function(val) {
- return parseFloat(val / 100).toFixed(2)
- }
- },
- methods: {
- selectDateTime(e) {
- if (e != null) {
- this.searchForm.start_date = e[0];
- this.searchForm.end_date = e[1];
- } else {
- this.searchForm.start_date = '';
- this.searchForm.end_date = '';
- }
- },
- // 1.0 获取视频列表
- loadData(page) {
- this.loading = true;
- request({
- params: {
- r: 'valet-order/default/index',
- page: page,
- ...this.searchForm
- },
- }).then(e => {
- this.loading = false;
- if (e.data.code === 0) {
- this.list = e.data.data.list ? e.data.data.list : [];
- if (this.list.length > 0) {
- this.pagination = e.data.data.pagination;
- this.totalAmount = e.data.data.total_amount
- }
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {});
- },
- pageChange(page) {
- this.loadData(page);
- },
- handleSelectionChange(val) {
- let self = this;
- self.choose_list = [];
- val.forEach(function (item) {
- self.choose_list.push(item.id);
- })
- },
- onSearch() {
- this.loadData(1);
- },
- onResetSearch() {
- this.searchForm = {
- user_id: '',
- nickname: '',
- phone: ''
- }
- },
- goOrderDetail(item) {
- let params = {
- r: 'mall/order/detail',
- id: item.order_id
- };
- navigateTo(params);
- },
- onEdit() {
- let params = {
- r: 'valet-order/default/create',
- };
- navigateTo(params);
- }
- }
- });
- </script>
- <style>
- .el-tabs__header {
- font-size: 16px;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .input-item {
- width: 250px;
- margin: 0 0 20px;
- display: inline-block;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .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;
- }
- .batch {
- margin: 0 0 20px;
- display: inline-block;
- }
- .batch .el-button {
- padding: 9px 15px !important;
- }
- .item-box{
- margin-right: 20px;
- }
- .item-box .label{
- margin-right: 8px;
- }
- .item-box .symbol{
- margin: 0 6px;
- }
- .form-nickname{
- width: 180px;
- white-space:nowrap;
- overflow:hidden;
- text-overflow:ellipsis;
- }
- .index-video-url{
- width: 300px;
- }
- .index-video-url video{
- width: 100%;
- }
- .index-related-info{
- width: 500px;
- }
- .video-top{
- width: 100%;
- display: flex;
- align-items: flex-start;
- box-sizing: border-box;
- padding: 20px;
- /* opacity: .5; */
- background-color: #FFFFFF;
- }
- .video-top .top-right{
- line-height: 26px;
- }
- .video-top .top-right .top-title{
- font-size: 18px;
- white-space:nowrap;
- overflow:hidden;
- text-overflow:ellipsis;
- width: 360px;
- }
- .video-top .top-right .wrapper{
- display: flex;
- /* align-items: flex-start; */
- }
- .video-top .top-right .wrapper .to-copy{
- /* color: #03C5FF; */
- margin-left: 20px;
- }
- .video-top .top-right .detail-price{
- color: #BC0100;
- font-size: 18px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- }
- /* .atooltip {
- background: #FFFFFF !important;
- border: none !important;
- } */
- .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;
- }
- .price_col{
- color: #FF5D05;
- }
- .text-danger {
- color: #F56C6C;
- }
- .text-info {
- color: #909399;
- }
- </style>
|