| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301 |
- <?php
- use common\helpers\ComponentHelper;
- ?>
- <style>
- </style>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <span>延时结算明细</span>
- </div>
- <div class="table-body">
- <div class="input-item">
- <el-input @keyup.enter.native="loadData" size="small" placeholder="请输入订单编号" v-model="search.order_no" clearable @clear="toSearch">
- </el-input>
- </div>
- <div class="input-item">
- <el-input @keyup.enter.native="loadData" size="small" placeholder="请输入关键字搜索" v-model="search.keyword" clearable @clear="toSearch">
- </el-input>
- </div>
- <el-date-picker size="small" v-model="search.date" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="addTimeChange">
- </el-date-picker>
- <div class="input-item">
- <el-select size="small" v-model="search.wallet_type" @change='toSearch' class="select" placeholder="资金类型" clearable>
- <el-option :key="index" :label="item" :value="index" v-for="(item, index) in wallet_types"></el-option>
- </el-select>
- </div>
- <div class="input-item">
- <el-select size="small" v-model="search.status" @change='toSearch' class="select" placeholder="结算状态" clearable>
- <el-option key="0" label="未结算" value="0"></el-option>
- <el-option key="1" label="已结算" value="1"></el-option>
- </el-select>
- </div>
- <el-button type="primary" size="small" @click="toSearch">搜索</el-button>
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" @selection-change="handleSelectionChange">
- <!-- <el-table-column align='center' type="selection"></el-table-column>-->
- <el-table-column prop="user_id" label="用户ID" width="80" align="center"></el-table-column>
- <el-table-column label="用户昵称">
- <template slot-scope="scope">
- <div class="user_img" flex="cross:center">
- <el-image class="default-avatar" :src="scope.row.user.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
- </div>
- </el-image>
- <div class="nickname-box">
- <div class="uer-nickname over1">{{scope.row.user.nickname}}</div>
- <div class="uer-nickname over1">{{scope.row.user.mobile}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="contributor_name" label="商品名称"></el-table-column>
- <el-table-column label="订单号" prop="order_no" align="center">
- <template slot-scope="scope">
- <span style="display:block;">{{scope.row.order_no}}</span>
- <span class="tag-diff" v-if="scope.row.order_no && scope.row.order_no.indexOf('DYC') > -1">抖音cps订单</span>
- </template>
- </el-table-column>
- <el-table-column label="资产类型" prop="wallet_type" align="center" width="100">
- <template slot-scope="scope">
- <el-tag type="success" size="small" v-if="scope.row.wallet_type == 'commission'">{{ wallet_types[scope.row.wallet_type] }}</el-tag>
- <el-tag type="warning" size="small" v-else="scope.row.wallet_type == 'commission'">{{ wallet_types[scope.row.wallet_type] }}</el-tag>
- </template>
- </el-table-column>
- <el-table-column label="结算金额" prop="wallet_num" align="center" width="100">
- <template slot-scope="scope">
- <el-link type="primary" :underline="false" class="wallet-price">{{ scope.row.wallet_num }}</el-link>
- </template>
- </el-table-column>
- <el-table-column label="延时天数" prop="day_num" align="center" width="100"></el-table-column>
- <el-table-column label="资产说明" prop="wallet_desc" align="center"></el-table-column>
- <el-table-column label="结算状态" prop="status" align="center">
- <template slot-scope="scope">
- {{ scope.row.status ? '已结算' : '未结算' }}
- </template>
- </el-table-column>
- <el-table-column label="创建时间" align="center">
- <template slot-scope="scope">
- {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
- </template>
- </el-table-column>
- <el-table-column label="结算时间" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.agented_at">{{scope.row.agented_at|dateTimeFormat('Y-m-d H:i:s')}}</span>
- <span v-else>--</span>
- </template>
- </el-table-column>
- </el-table>
- </el-tabs>
- <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>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- search: {
- order_no: '',
- keyword: '',
- page: 1,
- status: '',
- wallet_type: '',
- date_start: '',
- date_end: '',
- date: []
- },
- wallet_types: {},
- loading: false,
- activeName: '-1',
- list: [],
- pagination: null,
- exportList: {},
- choose_list: [],
- export_url: 'agent/detail/index', // 导出路径
- },
- mounted() {
- this.loadData();
- },
- methods: {
- addTimeChange(v) {
- this.search.date_start = v ? v[0] : '';
- this.search.date_end = v ? v[1] : '';
- },
- confirmSubmit() {
- console.log(this.activeName)
- this.search.status = this.activeName
- },
- loadData() {
- this.loading = true;
- let params = {
- r: 'agent/delay-log/index'
- };
- params = Object.assign(params, this.search);
- request({
- params: params,
- method: 'get',
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.list = e.data.data.list;
- this.pagination = e.data.data.pagination;
- this.wallet_types = e.data.data.wallet_types;
- // this.exportList = e.data.data.export_list;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- pageChange(page) {
- this.search.page = page;
- this.loadData();
- },
- handleClick(tab, event) {
- this.search.page = 1;
- this.search.status = this.activeName;
- this.loadData()
- },
- toSearch() {
- this.search.page = 1;
- this.loadData();
- },
- editClick() {
- this.edit.show = true;
- },
- handleSelectionChange(val) {
- let self = this;
- self.choose_list = [];
- val.forEach(function(item) {
- self.choose_list.push(item.id);
- })
- }
- }
- });
- </script>
- <style>
- .el-tabs__header {
- font-size: 16px;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .table-body .el-button {
- border: 0;
- margin: 0 5px;
- }
- .input-item {
- 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;
- }
- .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;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .table1 .el-table__footer-wrapper,
- .table1 .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .user_img {
- position: relative;
- margin-right: 8px;
- }
- .default-avatar {
- width: 50px;
- height: 50px;
- border-radius: 50%;
- margin-right: 8px;
- }
- .uer-nickname {
- flex: 1;
- }
- .tag-diff{
- display: inline-block;
- background-color: rgba(112, 182, 3, 1);
- color: #fff;
- border-radius: 42px;
- line-height: 22px;
- height: 22px;
- padding: 0 6px;
- }
- .wallet-price {
- font-size: 16px;
- }
- </style>
|