123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <template>
- <div>
- <div class="sty">
- <el-page-header @back="goBack" content="信用额度变更记录">
- </el-page-header>
- </div>
- <el-divider></el-divider>
- <!-- 表头 -->
- <div>
- <el-form ref="searchForm" :model="searchForm" label-width="100px" size="small" label-position="left">
- <el-row :gutter="20">
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="开始时间" prop="startTime">
- <el-date-picker class="selectStyle" v-model="searchForm.startTime" type="datetime" placeholder="选择日期时间" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6">
- <el-form-item label="结束时间" prop="endTime">
- <el-date-picker class="selectStyle" v-model="searchForm.endTime" type="datetime" placeholder="选择日期时间" default-time="00:00:00" value-format="yyyy-MM-dd HH:mm:ss">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :xs="24" :sm="24" :lg="12">
- <el-form-item label="" class="fr">
- <el-button size="small" @click="clearFn">清空</el-button>
- <el-button size="small" type="primary" @click="searchFn">搜索</el-button>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <!-- 按钮 -->
- <div class="btn-group clearfix">
- <div class="fr">
- <el-button type="primary" size="small" @click="exportList">导出</el-button>
- </div>
- </div>
- <!-- 列表 -->
- <div class="mymain-container">
- <div class="table">
- <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
- <el-table-column label="序号" align="left" width="100" type="index" show-overflow-tooltip></el-table-column>
- <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip>
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.customerNumber" />
- <span>{{scope.row.customerNumber}}</span>
- </template>
- </el-table-column>
- <el-table-column align="left" label="经销商名称" prop="customerName" min-width="260" show-overflow-tooltip>
- <template slot-scope="scope">
- <CopyButton :copyText="scope.row.customerName" />
- <span>{{scope.row.customerName}}</span>
- </template>
- </el-table-column>
- <el-table-column align="left" label="关联钱包" prop="customerWalletName" min-width="160" show-overflow-tooltip></el-table-column>
- <el-table-column align="right" label="变更金额" prop="amount" min-width="160" show-overflow-tooltip></el-table-column>
- <el-table-column align="right" label="使用金额" prop="useAmount" min-width="160" show-overflow-tooltip></el-table-column>
- <el-table-column align="left" label="开始日期" prop="startTime" min-width="160" show-overflow-tooltip></el-table-column>
- <el-table-column align="left" label="结束日期" prop="endTime" min-width="160" show-overflow-tooltip></el-table-column>
- <el-table-column align="left" label="变更时间" prop="updateTime" min-width="160" show-overflow-tooltip></el-table-column>
- <el-table-column align="left" label="变更人" prop="updateBy" min-width="160" show-overflow-tooltip></el-table-column>
- </el-table>
- </div>
- <!-- 分页 -->
- <div class="fr">
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" :total="listTotal">
- </el-pagination>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { getCreditRecordList } from "@/api/finance/credit_list";
- import { downloadFiles } from "@/utils/util";
- export default {
- props: {
- recordsListId: {
- type: String,
- required: true,
- },
- },
- data() {
- return {
- currentPage: 1, // 当前页码
- pageSize: 10, // 每页数量
- listTotal: 0, // 列表总数
- dataList: [], // 列表数据
- searchForm: {
- startTime: "",
- endTime: "",
- }, //搜索表单
- listLoading: false, // 列表加载loading
- };
- },
- created() {
- this.getDataList({
- customerWalletId: this.recordsListId,
- pageSize: this.pageSize,
- pageNum: this.currentPage,
- });
- },
- methods: {
- // 更改每页数量
- handleSizeChange(val) {
- this.pageSize = val;
- this.currentPage = 1;
- this.getDataList({ pageNum: 1, pageSize: this.pageSize });
- },
- // 更改当前页
- handleCurrentChange(val) {
- this.currentPage = val;
- this.getDataList({ pageNum: val, pageSize: 10 });
- },
- //导出
- exportList() {
- let screenData = {
- customerWalletCreditId: this.recordsListId,
- startTime: this.searchForm.startTime,
- endTime: this.searchForm.endTime,
- };
- downloadFiles("/credit/record/export", screenData);
- },
- //清除
- clearFn() {
- this.$refs.searchForm.resetFields();
- },
- //搜索
- searchFn() {
- console.log(this.searchForm);
- this.getDataList({
- customerWalletId: this.recordsListId,
- pageSize: this.pageSize,
- pageNum: this.currentPage,
- ...this.searchForm,
- });
- },
- //获取信用额度变更记录数据
- async getDataList(data) {
- const res = await getCreditRecordList(data);
- this.dataList = res.data.records;
- this.listTotal = res.data.total;
- },
- goBack() {
- this.$parent.showRecord = true;
- },
- },
- };
- </script>
- <style>
- </style>
|