瀏覽代碼

采购跟单,销售跟单: 分页功能

lxf 2 年之前
父節點
當前提交
77e2493d90

+ 21 - 1
src/views/purchaseManage/purchaseManage/purchaseDocumentary/index.vue

@@ -91,6 +91,17 @@
       </el-card>
     </div>
 
+    <el-row style="padding-top: 20px" justify="end" type="flex">
+      <el-pagination
+        background
+        layout="total, sizes, prev, pager, next, jumper"
+        :current-page="sourceList.pagination.pageNum"
+        :page-size="sourceList.pagination.pageSize"
+        :total="sourceList.pagination.total"
+        @size-change="handleSizeChange"
+        @current-change="handlePageChange" />
+    </el-row>
+
     <el-dialog :title="title" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #completionTime>
@@ -213,6 +224,15 @@ const getList = () => {
 };
 getDict();
 getList();
+const handleSizeChange = (val) => {
+  sourceList.value.pagination.pageNum = 1;
+  sourceList.value.pagination.pageSize = val;
+  getList();
+};
+const handlePageChange = (val) => {
+  sourceList.value.pagination.pageSize = val;
+  getList();
+};
 const selectRegion = (item) => {
   sourceList.value.pagination.pageNum = 1;
   if (selectRecordDocumentaryId.value && selectRecordDocumentaryId.value === item.id) {
@@ -392,7 +412,7 @@ const openFile = (path) => {
 }
 .main-content {
   margin-top: 20px;
-  height: calc(100vh - 140px - 232px);
+  height: calc(100vh - 140px - 232px - 52px);
   overflow: auto;
   &::-webkit-scrollbar {
     width: 0px;

+ 21 - 1
src/views/salesMange/saleContract/salesDocumentary/index.vue

@@ -91,6 +91,17 @@
       </el-card>
     </div>
 
+    <el-row style="padding-top: 20px" justify="end" type="flex">
+      <el-pagination
+        background
+        layout="total, sizes, prev, pager, next, jumper"
+        :current-page="sourceList.pagination.pageNum"
+        :page-size="sourceList.pagination.pageSize"
+        :total="sourceList.pagination.total"
+        @size-change="handleSizeChange"
+        @current-change="handlePageChange" />
+    </el-row>
+
     <el-dialog :title="title" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #completionTime>
@@ -213,6 +224,15 @@ const getList = () => {
 };
 getDict();
 getList();
+const handleSizeChange = (val) => {
+  sourceList.value.pagination.pageNum = 1;
+  sourceList.value.pagination.pageSize = val;
+  getList();
+};
+const handlePageChange = (val) => {
+  sourceList.value.pagination.pageSize = val;
+  getList();
+};
 const selectRegion = (item) => {
   sourceList.value.pagination.pageNum = 1;
   if (selectRecordDocumentaryId.value && selectRecordDocumentaryId.value === item.id) {
@@ -392,7 +412,7 @@ const openFile = (path) => {
 }
 .main-content {
   margin-top: 20px;
-  height: calc(100vh - 140px - 232px);
+  height: calc(100vh - 140px - 232px - 52px);
   overflow: auto;
   &::-webkit-scrollbar {
     width: 0px;