jbb 2 лет назад
Родитель
Сommit
27eb418764
1 измененных файлов с 28 добавлено и 22 удалено
  1. 28 22
      src/views/reportForms/supplier-capacity.vue

+ 28 - 22
src/views/reportForms/supplier-capacity.vue

@@ -117,6 +117,8 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
+import { supplierList } from '@api/reportForms/supplier-capacity'
+
 export default {
   name: 'PreBookList', // 预托书列表
   mixins: [JeecgListMixin],
@@ -136,7 +138,7 @@ export default {
         },
         { 
           title: '供应商名称', 
-          dataIndex: 'supplierName', 
+          dataIndex: 'supplier', 
           width: 120, 
           className: 'replacecolor' ,
           scopedSlots: { customRender: 'supplierName' },
@@ -157,14 +159,14 @@ export default {
         },
         { 
           title: '供应商状态', 
-          dataIndex: 'supplierStatus', 
+          dataIndex: 'supplierState', 
           width: 120, 
           className: 'replacecolor' ,
           scopedSlots: { customRender: 'supplierStatus' },
         },
         { 
           title: '备注', 
-          dataIndex: 'memo', 
+          dataIndex: 'remarks', 
           width: 120, 
           className: 'replacecolor' ,
           scopedSlots: { customRender: 'memo' },
@@ -172,22 +174,6 @@ export default {
         
       ],
       suplierListData: [
-        {
-          supplierCode:'1',
-          supplierName:'2',
-          capacityQuota:'3',
-          workingHours:'4',
-          supplierStatus:'5',
-          memo:'6'
-        },
-        {
-          supplierCode:'1',
-          supplierName:'2',
-          capacityQuota:'3',
-          workingHours:'4',
-          supplierStatus:'9',
-          memo:'6'
-        }
       ],
       selectedRowKeys:[],
       selectedRows:[],
@@ -208,13 +194,33 @@ export default {
   },
 
   created() {
-    this.suplierListData.map(item=>{
-      item.status = '1'
-    })
+    this.getSupplierList()
   },
   computed: {},
   mounted() {},
   methods: {
+    // 分页查询
+    getSupplierList(){
+      this.$nextTick(() => {
+        this.queryParam.pageSize = 20
+        supplierList(this.queryParam).then(res => {
+          if (res.success) {
+            this.suplierListData = res.result.records;
+            this.loading = false
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          this.suplierListData.map(item=>{
+             item.status = '1'
+             })
+          }else{
+              this.$message.error(res.message);
+          }
+        })
+      })
+    },
     addLine(){
       var line ={
         supplierCode:'',