| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350 |
- <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="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: 200px" v-model="search.out_trade_no" placeholder="支付流水号"></el-input>
- </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.out_trade_no}}</div>
- </template>
- </el-table-column>
- <el-table-column label="金额" width="80" align="center">
- <template slot-scope="scope">
- <div style="font-size: 13px;" >
- <span v-if="scope.row.change_type == change_type[1]">-</span>
- <span v-if="scope.row.change_type == change_type[0]">+</span>
- ¥{{scope.row.change_num}}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="来源" min-width="80" align="center">
- <template slot-scope="scope">
- {{from_type[scope.row.from_type]}}
- </template>
- </el-table-column>
- <el-table-column label="支付类型" min-width="80" align="center">
- <template slot-scope="scope">
- <div style="font-size: 13px;" >{{payment_type[scope.row.payment_type]}}</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.desc}}</div>
- </template>
- </el-table-column>
- <el-table-column prop="scope" width="160" label="创建时间">
- <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 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:{'add_money':0,'sub_money':0},
- //基础数据
- editBasisData: {
- materialTypeList: [],
- },
- //本地存时间,请求时不发送
- time: [],
- search: {
- out_trade_no: '',
- date_start: null,
- date_end: null,
- },
- list: [],
- change_type:[0,1],
- from_type:[],
- payment_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/finance/index',
- },
- data: {
- page: self.page,
- out_trade_no: self.search.out_trade_no,
- date_start: self.search.date_start,
- date_end: self.search.date_end,
- },
- }).then(e => {
- self.listLoading = false;
- self.list = e.data.data.list;
- this.change_type = e.data.data.change_type;
- this.from_type = e.data.data.from_type;
- this.statistics = e.data.data.statistics;
- this.payment_type = e.data.data.payment_type;
- console.log(this.change_type,66);
- 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>
|