Pārlūkot izejas kodu

fix:分页参数

zh 2 gadi atpakaļ
vecāks
revīzija
9f03da227e

+ 23 - 8
src/layout/components/Navbar.vue

@@ -145,13 +145,13 @@
             <div />
             <div class="fr">
               <el-pagination
-                :current-page="currentPage"
+                :current-page="currentPage2"
                 :page-sizes="[10, 20, 30, 50]"
                 :page-size="10"
                 layout="total, prev, pager, next"
-                :total="listTotal"
-                @size-change="handleSizeChange"
-                @current-change="handleCurrentChange"
+                :total="listTotal2"
+                @size-change="handleSizeChange2"
+                @current-change="handleCurrentChange2"
               />
             </div>
           </div>
@@ -347,7 +347,10 @@ export default {
       invoiceOrderList: [],
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
-      listTotal: 0 // 列表总数
+      listTotal: 0, // 列表总数
+      currentPage2: 1, // 当前页码
+      pageSize2: 10, // 每页数量
+      listTotal2: 0 // 列表总数
     }
   },
   mounted() {
@@ -404,12 +407,12 @@ export default {
     getNoticeList() {
       this.listLoading = true
       getNoticeList({
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
+        pageNum: this.currentPage2,
+        pageSize: this.pageSize2,
         specification: this.form.specification
       }).then(res => {
         this.noticeList = res.data.records
-        this.listTotal = res.data.total
+        this.listTotal2 = res.data.total
         this.listLoading = false
       })
     },
@@ -653,6 +656,18 @@ export default {
     handleShow() {
       ;(this.isLogistics = true), this.getListInvoiceOrder()
     },
+        // 更改每页数量
+        handleSizeChange2(val) {
+      this.pageSize2 = val
+      this.currentPage2 = 1
+      this.getNoticeList()
+    },
+    // 更改当前页
+    handleCurrentChange2(val) {
+      this.currentPage2 = val
+
+      this.getNoticeList()
+    },
     // 更改每页数量
     handleSizeChange(val) {
       this.pageSize = val

+ 2 - 2
src/views/basic_data/dealer/components/dealer_list-detail.vue

@@ -400,8 +400,8 @@ export default {
         id: this.detailsId,
         isFront: this.isFront,
         isPick: this.isPick,
-        pickCategory: this.pickCategory.join(','),
-        frontCategory:this.frontCategory.join(',')
+        pickCategory:this.isPick? this.pickCategory.join(','):'',
+        frontCategory:this.isFront? this.frontCategory.join(','):''
       }).then(res => {
         this.$successMsg('保存成功')
         this.$parent.isShow = true