| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390 |
- <style>
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .input-item {
- display: inline-block;
- width: 250px;
- margin: 0 0 20px;
- }
- .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;
- }
- .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .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;
- }
- .label {
- margin-right: 10px;
- }
- .default-goods{
- max-width: 50px;
- max-height: 50px;
- }
- .flex-x-between {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- -webkit-box-pack: space-between;
- -webkit-justify-content: space-between;
- -ms-flex-pack: space-between;
- justify-content: space-between;
- }
- .cont-title {
- font-size: 15px;
- padding-top: 20px;
- padding-bottom: 10px;
- font-weight: 700;
- }
- .cont-num {
- font-size: 14px;
- font-weight: 700;
- padding-bottom: 10px;
- }
- .center {
- text-align: center;
- }
- .el-dialog__header .el-dialog__title{
- font-size: 18px;
- }
- .el-dialog__wrapper .el-dialog__body{
- padding: 3px 20px;
- }
- /*头像样式 start*/
- .default-avatar{
- width: 50px;
- height: 50px;
- border-radius: 50%;
- }
- .user_img{
- position: relative;
- margin-right: 8px;
- height: 50px;
- width: 50px;
- }
- .el-table_1_column_2 .cell { /*-2 表示在第二行*/
- display: flex;
- }
- /*头像样式 end*/
- .num-info {
- display: flex;
- width: 100%;
- height: 60px;
- font-size: 28px;
- color: #303133;
- }
- .num-info .num-info-item {
- text-align: center;
- width: 25%;
- border-left: 1px dashed #EFF1F7;
- }
- .num-info .num-info-item:first-of-type {
- border-left: 0;
- }
- .info-item-name {
- font-size: 16px;
- color: #92959B;
- }
- .tab-pay {
- position: absolute;
- bottom: 0;
- right: 50px;
- }
- .tab-pay .el-tabs__item {
- height: 56px;
- line-height: 56px;
- }
- .pay-info {
- padding: 40px 0;
- display: flex;
- background-color: #fff;
- }
- .pay-info .pay-info-item {
- padding-top: 20px;
- width: 22%;
- margin: 0 0.5%;
- text-align: center;
- font-size: 26px;
- border: 1px solid #c8cacf;
- border-radius: 10px;
- height: 113px;
- position: relative;
- cursor: pointer;
- }
- .pay-info .pay-info-item.active {
- border: 1px solid #3399FF;
- }
- .pay-info .pay-info-item img {
- display: none;
- }
- .pay-info .pay-info-item.active img {
- position: absolute;
- top: 0;
- left: 0;
- display: block;
- }
- .line{
- width: 100%;
- height: 5px;
- clear: both;
- background-color: #f3f3f3;
- }
- </style>
- <div id="app" v-cloak>
- <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <div>
- <span>全部订单</span>
- </div>
- </template>
- </div>
- <!-- 选择框 -->
- <div class="pay-info">
- <div class="pay-info-item" >
- <img src="statics/img/mall/statistic/active.png" alt="">
- <div>{{statistics['order_num']}}</div>
- <div class="info-item-name">全部订单</div>
- </div>
- <div class="pay-info-item">
- <img src="statics/img/mall/statistic/active.png" alt="">
- <div>{{statistics['pay_num']}}</div>
- <div class="info-item-name">已完成</div>
- </div>
- <div class="pay-info-item" >
- <img src="statics/img/mall/statistic/active.png" alt="">
- <div>{{statistics['cancel_order_num']}}</div>
- <div class="info-item-name">已关闭</div>
- </div>
- </div>
- <div class="table-body el-input--small">
- <el-form size="small" :inline="true" flex="dir:left cross:center" style="margin-bottom: 12px;">
- <div class="item-box" flex="dir:left cross:center">
- <div class="label">创建时间</div>
- <el-date-picker
- v-model="time"
- type="datetimerange"
- value-format="yyyy-MM-dd HH:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </div>
- <div class="item-box" flex="dir:left cross:center" style="margin-right: 20px; margin-left: 20px;">
- <div class="label">购买名称</div>
- <el-input style="width: 150px" v-model="search.consumer_name" placeholder="购买名称"></el-input>
- </div>
- <div class="item-box" flex="dir:left cross:center" style="margin-right: 20px">
- <div class="label">标题</div>
- <el-input style="width: 150px" v-model="search.title" placeholder="标题"></el-input>
- </div>
- <div class="item-box" flex="dir:left cross:center" style="margin-right: 20px">
- <div class="label">支付状态</div>
- <el-select size="small" v-model="search.order_status" class="select">
- <el-option label="待支付" value="0"></el-option>
- <el-option label="已完成" value="4"></el-option>
- <el-option label="已关闭" value="-4"></el-option>
- </el-select>
- </div>
- <div class="item-box" flex="dir:left cross:center">
- <el-button type="primary" style="padding: 12px 34px !important;" @click="searchs">搜索
- </el-button>
- </div>
- </el-form>
- </div>
- <div class="line"></div>
- <div class="table-body el-input--small">
- <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
- <el-table-column label="标题" min-width="80" align="center">
- <template slot-scope="scope">
- <div style="font-size: 13px;" >{{scope.row.title}}</div>
- </template>
- </el-table-column>
- <el-table-column label="订单编号" min-width="80" align="center">
- <template slot-scope="scope">
- <div style="font-size: 13px;" >{{scope.row.order_no}}</div>
- </template>
- </el-table-column>
- <el-table-column label="类型" min-width="80" align="center">
- <template slot-scope="scope">
- {{consumer_type[scope.row.consumer_type]}}
- </template>
- </el-table-column>
- <el-table-column label="购买名称" min-width="80" align="center">
- <template slot-scope="scope">
- <div style="font-size: 13px;" >{{scope.row.consumer_name}}</div>
- </template>
- </el-table-column>
- <el-table-column label="支付金额" min-width="80" align="center">
- <template slot-scope="scope">
- <div style="font-size: 13px;" >{{scope.row.pay_money}}</div>
- </template>
- </el-table-column>
- <el-table-column prop="scope" width="160" label="支付时间">
- <template slot-scope="scope">
- <div v-if="scope.row.order_status == 4">{{scope.row.pay_time|dateTimeFormat('Y-m-d H:i:s')}}</div>
- <div v-else>未支付</div>
- </template>
- </el-table-column>
- <el-table-column prop="scope" width="160" label="订单状态">
- <template slot-scope="scope">
- <div v-if="scope.row.order_status == 0">待支付</div>
- <div v-if="scope.row.order_status == 4">已完成</div>
- <div v-if="scope.row.order_status == -4">已关闭</div>
- </template>
- </el-table-column>
- <el-table-column label="结算状态" min-width="80" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.settlement_status == 0">未结算</div>
- <div v-if="scope.row.settlement_status == 1">已结算</div>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination v-if="pagination" :page-size="pagination.pageSize"
- style="display: inline-block;float: right;" background @current-change="pageChange"
- layout="prev, pager, next" :total="pagination.total_count">
- </el-pagination>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- listLoading: false,
- page: 1,
- order: true,
- pageCount: 0,
- statistics:{'order_num':0,'pay_num':0,'cancel_order_num':0},
- //基础数据
- editBasisData: {
- materialTypeList: [],
- },
- //本地存时间,请求时不发送
- time: [],
- search: {
- consumer_name: '',
- title: '',
- order_status: null,
- date_start: null,
- date_end: null,
- },
- from_type:'',
- list: [],
- consumer_type:[],
- pagination:null,
- };
- },
- methods: {
- searchs() {
- this.page = 1;
- this.getList();
- },
- pageChange(currentPage) {
- let self = this;
- self.page = currentPage;
- self.getList();
- },
- getList() {
- let self = this;
- self.listLoading = true;
- // 检查是否选择了搜索时间
- if (!self.time) {
- self.search.date_start = '';
- self.search.date_end = '';
- } else {
- self.search.date_start = self.time[0];
- self.search.date_end = self.time[1];
- }
- request({
- method: 'post',
- params: {
- r: 'admin/platform-order/index',
- },
- data: {
- page: self.page,
- consumer_name: self.search.consumer_name,
- order_status: self.search.order_status,
- date_start: self.search.date_start,
- date_end: self.search.date_end,
- title: self.search.title,
- },
- }).then(e => {
- self.listLoading = false;
- self.list = e.data.data.list;
- this.consumer_type = e.data.data.consumer_type;
- this.statistics = e.data.data.statistics;
- this.from_type = e.data.data.from_type;
- this.pagination = e.data.data.pagination;
- this.pagination.pageSize = e.data.data.page_size;
- this.pagination.total_count = e.data.data.count;
- }).catch(e => {
- console.log(e);
- });
- },
- },
- mounted: function () {
- this.getList();
- }
- });
- </script>
|