Explorar o código

经销商列表分页更改

chen %!s(int64=3) %!d(string=hai) anos
pai
achega
c807da19f6
Modificáronse 1 ficheiros con 19 adicións e 12 borrados
  1. 19 12
      src/views/basic_data/dealer/dealer_list.vue

+ 19 - 12
src/views/basic_data/dealer/dealer_list.vue

@@ -88,6 +88,11 @@ export default {
       listTotal: 0, // 列表总数
       searchForm: {
         keyword: "",
+        bindUser: "",
+        isGroupCompany: "",
+        keyword: "",
+        region: "",
+        websitNumber: "",
       },
       inforList: {},
     };
@@ -96,7 +101,7 @@ export default {
     DealerListDetail,
   },
   async created() {
-    await this.getList({ pageNum: 1, pageSize: 10 });
+    await this.getList();
   },
   computed: {
     exParams() {
@@ -109,39 +114,41 @@ export default {
     // 提交筛选表单
     submitScreenForm() {
       this.currentPage = 1;
-      this.getList({ pageNum: 1, pageSize: 10 });
+      this.getList();
     },
     // 重置筛选表单
     resetScreenForm() {
       this.$refs.screenForm.resetFields();
       this.currentPage = 1;
-      this.getList({ pageNum: 1, pageSize: 10 });
+      this.getList();
     },
     // 更改每页数量
     handleSizeChange(val) {
       this.pageSize = val;
-      this.currentPage = 1;
-      this.getList({ pageNum: 1, pageSize: this.pageSize });
+
+      this.getList();
     },
     // 更改当前页
     handleCurrentChange(val) {
       this.currentPage = val;
-      this.getList({ pageNum: val, pageSize: 10 });
+      this.getList();
     },
     //搜索功能
     async searchFn() {
-      console.log(this.searchForm);
-      await this.getList({ ...this.searchForm, pageNum: 1, pageSize: 10 });
+      await this.getList();
     },
     //重置
     clearFn() {
-      console.log(this.$refs.searchForm);
       this.$refs.searchForm.resetFields();
     },
     //获取列表数据
-    async getList(data) {
-      const res = await getDealerList(data);
-      console.log(res);
+    async getList() {
+      let params = {
+        ...this.searchForm,
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+      };
+      const res = await getDealerList(params);
       this.dataList = res.data.records;
       this.listTotal = res.data.total;
     },