| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <?php
- use common\helpers\ComponentHelper;
- ComponentHelper::loadComponentView('com-list-page');
- ComponentHelper::loadComponentView('com-list-table');
- ComponentHelper::loadComponentView('com-export-dialog');
- ComponentHelper::loadComponentView('com-user-info');
- ?>
- <com-list-page :crumbs="crumbs" id="application">
- <com-list-table
- ref="table"
- @selection-change="handleSelectionChange"
- :search-list="searchList"
- @search="handleSearch"
- @set-action-name="setActionName"
- :active-name="activeName"
- :api-params="apiParams"
- @get-api-data="getApiData"
- >
- <el-table-column prop="user_id" label="用户ID" align="center"></el-table-column>
- <el-table-column prop="user" align="center" min-width="180" label="用户信息">
- <template slot-scope="scope">
- <com-user-info :user="scope.row.user"></com-user-info>
- </template>
- </el-table-column>
- <el-table-column prop="equal_award_price" label="已结算平级奖" align="center"></el-table-column>
- <el-table-column prop="equal_award_frozen_price" label="待结算平级奖" align="center"></el-table-column>
- <el-table-column prop="difference_profit" label="差价利润" align="center"></el-table-column>
- <el-table-column prop="loss_amount" label="流失金额" align="center"></el-table-column>
- <template slot="header-left">
- <com-export-dialog
- style="margin-left: 20px "
- :field_list='exportList'
- :action_url='export_url'
- :params="searchInfo">
- </com-export-dialog>
- </template>
- </com-list-table>
- </com-list-page>
- <script>
- const application = new Vue({
- el: '#application',
- data: {
- crumbs: [
- {
- title: '数据统计',
- router: '',
- }
- ],
- searchList: [
- {
- key: 'keyword',
- title: '请输入用户昵称/手机号搜索',
- type: 'text',
- },
- {
- key: 'date',
- title: '日期',
- type: 'date-picker',
- valueFormat: 'yyyy-MM-dd',
- },
- ],
- btnLoad: false,
- apply_edit: false,
- id: 0,
- remark: '',
- check_remark: '',
- check_status: '1',
- export_url: 'cloud-stock/statistics/index', // 导出路径
- exportList: {},
- searchInfo: {
- active_name: 'settlement',
- },
- activeName: 'settlement',
- apiParams: {
- r: 'cloud-stock/statistics/index',
- active_name: 'settlement',
- },
- multipleSelection: []
- },
- mounted() {
- this.getExportList();
- },
- methods: {
- getExportList() {
- this.listLoading = true;
- let params = {
- r: 'cloud-stock/statistics/get-export-list',
- };
- request({
- params: params,
- method: 'get',
- }).then(e => {
- if (e.data.code == 0) {
- this.exportList = e.data.data;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- handleSearch(keyword) {
- this.searchInfo = keyword;
- this.searchInfo.active_name = this.activeName;
- },
- setActionName(val) {
- this.searchInfo.active_name = val;
- this.activeName = val
- this.$set(this.apiParams, "active_name", val)
- this.$refs.table.handleSearch();
- },
- getApiData(data) {
- },
- }
- })
- </script>
|