소스 검색

供应商修改

chen 3 년 전
부모
커밋
ae564863e4
1개의 변경된 파일11개의 추가작업 그리고 44개의 파일을 삭제
  1. 11 44
      src/views/basic_data/supplier/supplier_list.vue

+ 11 - 44
src/views/basic_data/supplier/supplier_list.vue

@@ -66,7 +66,7 @@
             <el-table-column
               align="center"
               label="名称"
-              prop="useOrgName"
+              prop="name"
               min-width="100"
             ></el-table-column>
             <el-table-column
@@ -134,7 +134,7 @@ export default {
       dataList: [], // 表格数据
 
       isShow: true,
-      screenForm: {
+      searchForm: {
         // 筛选表单数据
         name: "",
       },
@@ -167,17 +167,7 @@ export default {
       console.log(this.$refs.searchForm);
       this.$refs.searchForm.resetFields();
     },
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1;
-      this.getList({ pageNum: 1, pageSize: 10 });
-    },
-    // 重置筛选表单
-    resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList({ pageNum: 1, pageSize: 10 });
-    },
+
     // 更改每页数量
     handleSizeChange(val) {
       this.pageSize = val;
@@ -194,46 +184,23 @@ export default {
       const res = await getInfoApi({ id });
       this.infoList = res.data;
     },
-    getList() {
-      this.listLoading = true;
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        auditName: "",
-        groupName: "",
-        name: this.screenForm.name,
-        number: "",
-        shortName: "",
-        useOrgName: "",
-        useOrgNumber: "",
-      };
-      getSupplierList(params).then((res) => {
-        this.dataList = res.data.records;
-        this.listTotal = res.data.total;
-        this.listLoading = false;
-      });
-    },
-    // 提交筛选表单
-    submitScreenForm() {
-      this.currentPage = 1;
-      this.getList();
-    },
-    // 重置筛选表单
-    resetScreenForm() {
-      this.$refs.screenForm.resetFields();
-      this.currentPage = 1;
-      this.getList();
+    async getList(data) {
+      let res = await getList(data);
+      console.log(res);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
     },
+
     // 更改每页数量
     handleSizeChange(val) {
       this.pageSize = val;
       this.currentPage = 1;
-      this.getList();
+      this.getList({ pageNum: 1, pageSize: this.pageSize });
     },
     // 更改当前页
     handleCurrentChange(val) {
       this.currentPage = val;
-      this.getList();
+      this.getList({ pageNum: val, pageSize: 10 });
     },
   },
 };