| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-export-dialog');
- ?>
- <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;
- }
- .el-date-editor .el-range-separator {
- /* 设置选择日期框的中间的 ‘至’ 的宽度 */
- width: 8%;
- }
- </style>
- <div id="app" v-cloak>
- <el-card shadow="never" body-style="background-color: #f3f3f3;padding: 10px 0 0;" style="min-width: 1000px;">
- <div slot="header">
- <div>
- <span>分账记录</span>
- <div style="float: right; margin: -5px 0">
- <!-- <el-button type="primary" size="small" @click="handle('edit')">添加商品</el-button>-->
- <!-- <el-button type="primary" size="small">订单导出</el-button>-->
- <!-- <com-export-dialog style="float: right;margin-top: -5px" :field_list='export_list' :action_url="export_url" :params="search">-->
- <!-- </com-export-dialog>-->
- </div>
- </div>
- </div>
- <div class="table-body">
- <div class="head" style="display: flex;flex-wrap: wrap;">
- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">门店信息</div>
- <el-input clearable size="small" type="text" v-model="search.store" placeholder="请输入门店ID/名称搜索" @keyup.enter.native="toSearch"></el-input>
- </div>
- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">会员信息</div>
- <el-input clearable size="small" type="text" v-model="search.member" placeholder="请输入会员昵称/手机号" @keyup.enter.native="toSearch"></el-input>
- </div>
- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">支付单号</div>
- <el-input clearable size="small" type="text" v-model="search.out_trade_no" placeholder="请输入支付单号" @keyup.enter.native="toSearch"></el-input>
- </div>
- <div style="display: flex;width: 350px;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">订单号</div>
- <el-input clearable size="small" type="text" v-model="search.order_no" placeholder="请输入订单号" @keyup.enter.native="toSearch"></el-input>
- </div>
- <div style="display: flex;margin-right: 20px;align-items: center;margin-bottom: 20px;">
- <div style="flex-shrink: 0;align-items: center; margin-right: 8px;">创建时间</div>
- <el-date-picker size="small" v-model="time" @change="datetimeChange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" align="center">
- </el-date-picker><!-- type="datetimerange" @change="datetimeChange" v-model="time"-->
- </div>
- <div class="item-box" flex="dir:left cross:center">
- <el-button size="small" type="primary" style="margin-bottom: 20px;" @click="toSearch">搜索
- </el-button>
- </div>
- <div class="item-box" flex="dir:left cross:center" v-if="search.order_no || search.start_time || search.end_time || search.user_id || search.user_keyword || search.out_trade_no || search.pay_type">
- <el-button size="small" type="warning" style="margin-bottom: 20px; margin-left: 10px;" @click="resetFun">清除搜索条件 </el-button>
- </div>
- </div>
- <el-table v-loading="listLoading" :data="list" stripe style="width: 100%">
- <el-table-column label="门店ID" width="100" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.store_id}}</div>
- </template>
- </el-table-column>
- <el-table-column label="门店信息" min-width="120">
- <template slot-scope="scope">
- <div class="table-info-img-text" v-if="scope.row.store">
- <el-image class="table-info-img circle" :src="scope.row.store.logo_img"> </el-image>
- <div class="table-info-text">
- <div v-if="scope.row.store.store_name">{{scope.row.store.store_name}}</div>
- <div>{{scope.row.store.shop_mobile}}</div>
- </div>
- </div>
- <div v-else>-</div>
- </template>
- </el-table-column>
- <el-table-column label="用户信息" min-width="120">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.order.user.avatar_url"> </el-image>
- <div class="table-info-text">
- <div v-if="scope.row.order.user.nickname">{{scope.row.order.user.nickname}}</div>
- <div>{{scope.row.order.user.mobile}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="单号" min-width="150" align="center">
- <template slot-scope="scope">
- <div size="small">订单号:{{scope.row.order_no}}</div>
- <div size="small">支付单号:{{scope.row.trade_no}}</div>
- </template>
- </el-table-column>
- <!-- <el-table-column label="支付单号" min-width="150" align="center">-->
- <!-- <template slot-scope="scope">-->
- <!-- <div size="small">{{scope.row.trade_no}}</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column label="订单金额" width="100" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.order.pay_money}}</div>
- </template>
- </el-table-column>
- <el-table-column label="平台入账金额" width="120" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.fee}}</div>
- </template>
- </el-table-column>
- <el-table-column label="门店入账金额" width="120" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.share_amount}}</div>
- </template>
- </el-table-column>
- <el-table-column label="订单状态" width="80" align="center">
- <template slot-scope="scope">
- <!-- <div size="small">{{order_status_list[scope.row.order.order_status]}}</div>-->
- <el-tag size="mini" :type="scope.row.settle_status == 100 ? 'success' : 'danger'">
- {{scope.row.settle_status == 100 ? '已分帐' : '待分账'}}
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column label="第三方响应" min-width="150" align="center">
- <template slot-scope="scope">
- {{scope.row.response ? scope.row.response : '-'}}
- </template>
- </el-table-column>
- <el-table-column label="创建时间" prop="user_id" width="120" align="center">
- <template slot-scope="scope">
- <div size="small">{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- </template>
- </el-table-column>
- <el-table-column label="操作" width="100" align="center">
- <template slot-scope="scope">
- <el-popconfirm v-if="scope.row.response && scope.row.settle_status == 1"
- @confirm="onShare(scope.row)" title="您真的要执行手动分账吗?">
- <el-button type="text" slot="reference" style="color: #F56C6C">手动分账</el-button>
- </el-popconfirm>
- <div v-else>-</div>
- </template>
- </el-table-column>
- </el-table>
- <div flex="box:last cross:center">
- <div></div>
- <div>
- <el-pagination v-if="list.length > 0" style="display: inline-block;float: right;" background :page-size="pagination.pageSize" @current-change="pageChange" layout="prev, pager, next" :current-page="pagination.current_page" :page-count="pageCount">
- </el-pagination>
- </div>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data() {
- return {
- export_list: {},
- export_url: 'huifu-pay/default/share-record',
- list: [],
- listLoading: false,
- page: 1,
- pageCount: 0,
- search: {
- page: 1,
- start_time: '',
- end_time: '',
- member: '',
- store: '',
- out_trade_no: '',
- order_no: '',
- pay_type: 0,
- limit: 10,
- },
- time: '',
- pagination: null,
- order_status_list: {
- '0': "待分账",
- '1': "待分账",
- '2': "待分账",
- '3': "待分账",
- '4': "已分账",
- '6': "待分账",
- '7': "已分帐",
- '-4': "已关闭",
- '-2': "待分账",
- '-1': "待分账"
- },
- };
- },
- methods: {
- resetFun() {
- this.search = {
- page: 1,
- start_time: '',
- end_time: '',
- member: '',
- store: '',
- out_trade_no: '',
- order_no: '',
- pay_type: 0,
- limit: 10,
- }
- this.time = '';
- this.toSearch();
- },
- datetimeChange() {
- if (this.time) {
- this.search.start_time = this.time[0];
- this.search.end_time = this.time[1];
- } else {
- this.search.start_time = '';
- this.search.end_time = '';
- }
- this.toSearch();
- },
- toSearch() {
- this.search.page = 1;
- this.getList();
- },
- pageChange(currentPage) {
- let self = this;
- self.search.page = currentPage;
- self.getList();
- },
- getList() {
- let self = this;
- self.listLoading = true;
- let params = {
- r: 'huifu-pay/default/share-record',
- }
- params = Object.assign(params, this.search);
- request({
- params: params,
- method: 'get',
- }).then(e => {
- self.listLoading = false;
- if (e.data.code == 0) {
- self.list = e.data.data.list;
- // self.export_list = e.data.data.export_list;
- this.pagination = e.data.data.pagination;
- self.pageCount = e.data.data.page_count;
- } else {
- self.$message.error(e.data.msg);
- }
- }).catch(e => {
- console.log(e);
- self.$message.error(e);
- });
- },
- onShare(item) {
- let self = this;
- request({
- params: {
- r: 'huifu-pay/default/share-retry'
- },
- method: 'post',
- data: {
- id: item.id
- }
- }).then(e => {
- if (e.data.code == 0) {
- self.$message.success('提交成功');
- self.getList()
- } else {
- self.$message.error(e.data.msg);
- }
- }).catch(e => {
- console.log(e);
- self.$message.error(e);
- });
- }
- },
- mounted: function() {
- this.getList();
- }
- });
- </script>
|