Przeglądaj źródła

fix: 开发收入明细和提现记录(分页调整)

wuguojie 5 miesięcy temu
rodzic
commit
8074aabbeb
2 zmienionych plików z 21 dodań i 28 usunięć
  1. 2 2
      src/views/finance/income/index.vue
  2. 19 26
      src/views/record/index.vue

+ 2 - 2
src/views/finance/income/index.vue

@@ -92,8 +92,7 @@
             :total="queryParams.total"
             :page.sync="queryParams.current"
             :limit.sync="queryParams.size"
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
+            @pagination="initData"
         />
     </div>
 </template>
@@ -194,6 +193,7 @@ export default {
             }).then((res) => {
                 if(res.code == 200) {
                     this.incomeData = res.data.records
+                    this.queryParams.total = res.data.total
                 }
             })
         },

+ 19 - 26
src/views/record/index.vue

@@ -116,17 +116,14 @@
                       </template>
                   </el-table-column>
               </el-table>
-              <el-pagination
+              <pagination
                       v-show="total > 0"
                       background
-                      @size-change="handleSizeChange"
-                      @current-change="handleCurrentChange"
-                      :current-page="queryParams.current"
-                      :page-size="queryParams.size"
-                      layout="total, sizes, prev, pager, next, jumper"
+                      :page.sync="queryParams.current"
+                      :limit.sync="queryParams.size"
                       :total="total"
-              >
-              </el-pagination>
+                      @pagination="getList"
+              />
               <!-- 添加或修改提现对话框 -->
               <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
                   <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@@ -257,16 +254,14 @@
                   </el-table-column>
                   <el-table-column prop="dtCreateTime" label="创建时间"></el-table-column>
               </el-table>
-              <el-pagination
+              <pagination
                   v-show="total > 0"
-                  @size-change="handleSizeChange"
-                  @current-change="handleCurrentChange"
-                  :current-page="queryParams.current"
-                  :page-size="queryParams.size"
-                  layout="total, sizes, prev, pager, next, jumper"
-                  :total="queryParams.total"
-              >
-              </el-pagination>
+                  background
+                  :page.sync="queryParams.current"
+                  :limit.sync="queryParams.size"
+                  :total="total"
+                  @pagination="getList"
+              />
           </el-tab-pane>
           <el-tab-pane label="审核驳回" name="third">
               <el-form :model="queryParams" label-width="68px">
@@ -327,16 +322,14 @@
                   <el-table-column prop="dtCreateTime" label="创建时间"></el-table-column>
                   <el-table-column prop="reject" label="驳回理由"></el-table-column>
               </el-table>
-              <el-pagination
+              <pagination
                   v-show="total > 0"
-                  @size-change="handleSizeChange"
-                  @current-change="handleCurrentChange"
-                  :current-page="queryParams.current"
-                  :page-size="queryParams.size"
-                  layout="total, sizes, prev, pager, next, jumper"
-                  :total="queryParams.total"
-              >
-              </el-pagination>
+                  background
+                  :page.sync="queryParams.current"
+                  :limit.sync="queryParams.size"
+                  :total="total"
+                  @pagination="getList"
+              />
           </el-tab-pane>
       </el-tabs>
   </div>