Browse Source

订单数据 分页

liangy 3 years ago
parent
commit
7fc07ffc39

+ 5 - 12
src/views/order/orderDetailDrawer.vue

@@ -221,6 +221,7 @@ export default {
       loading: false, // 表格加载
       // 分页
       pagination: {
+        pageNo: ''
         // total: '',
         // current: '',
         // pageSize: ''
@@ -229,13 +230,7 @@ export default {
       record: {} //点击的订单对象
     }
   },
-  // 接收父组件查询方法
-  // props: {
-  //   fatherList: {
-  //     type: Function,
-  //     default: null
-  //   }
-  // },
+
   created() {
     console.log('详情created0')
     this.getOrderChild()
@@ -246,7 +241,7 @@ export default {
     getOrderChild() {
       this.$nextTick(() => {
         console.log('详情拿到订单号', this.record.orderNumber)
-        orderByNum({ orderNumber: this.record.orderNumber }).then(res => {
+        orderByNum({ orderNumber: this.record.orderNumber, pageNo: this.pagination.pageNo }).then(res => {
           if (res.success) {
             // 子表信息赋值
             this.childData = res.result.records
@@ -255,8 +250,6 @@ export default {
               current: res.result.current,
               pageSize: res.result.size
             }
-            console.log('childData', this.childData)
-            console.log('分页信息:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
           }
         })
       })
@@ -274,9 +267,9 @@ export default {
         this.isorter.column = sorter.field
         this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
       }
-      console.log('详情 分页000')
+      console.log('点击页', pagination.current)
+      this.pagination.pageNo = pagination.current
       this.getOrderChild()
-      console.log('详情 分页111')
     }
   },
   computed: {},

+ 0 - 24
src/views/order/orderList.vue

@@ -249,27 +249,6 @@ export default {
             console.log('---', this.$refs.orderDetailDrawer.record)
             console.log('打开订单详情')
             this.$refs.orderDetailDrawer.orderDetail = record
-            // 子表信息获取
-            // orderByNum({ orderNumber: record.orderNumber }).then(res => {
-            //   if (res.success) {
-            //     // 子表信息赋值
-            //     this.$refs.orderDetailDrawer.childData = res.result.records
-            //     this.$refs.orderDetailDrawer.pagination = {
-            //       total: res.result.total,
-            //       current: res.result.current,
-            //       pageSize: res.result.size
-            //     }
-            //     console.log('childData', this.$refs.orderDetailDrawer.childData)
-            //     console.log(
-            //       '分页信息:',
-            //       this.$refs.orderDetailDrawer.pagination.total,
-            //       this.$refs.orderDetailDrawer.pagination.current,
-            //       this.$refs.orderDetailDrawer.pagination.pageSize
-            //     )
-            //     // console.log('主表信息', record)
-            //     this.$refs.orderDetailDrawer.orderDetail = record
-            //   }
-            // })
           }
         }
       }
@@ -285,7 +264,6 @@ export default {
       console.log('订单数据--同步')
     },
 
-    // 分页变化时触发
     handleTableChange(pagination, filters, sorter) {
       console.log('分页器信息', pagination)
       if (Object.keys(sorter).length > 0) {
@@ -293,9 +271,7 @@ export default {
         this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
       }
       this.queryParam.pageNo = pagination.current
-      // console.log('00');
       this.getOrderList() //重新渲染
-      // console.log('\\\\');
     }
   },
   computed: {},

+ 1 - 14
src/views/reportForms/supply-capacity-table.vue

@@ -134,20 +134,7 @@ export default {
         { title: '部门', width: 90, dataIndex: 'cdepCode', className: 'replacecolor' },
         { title: '业务员', width: 90, dataIndex: 'cpersonCode', className: 'replacecolor' },
         { title: '供应商', width: 180, dataIndex: 'cvenCode', className: 'replacecolor' },
-        // customRender: function(text) {
-        //   if (text == '1') {
-        //     return '销售类型1'
-        //   }
-        //   if (text == '2') {
-        //     return '销售类型2'
-        //   }
-        //   if (text == '3') {
-        //     return '销售类型3'
-        //   }
-        //   if (text == '4') {
-        //     return '销售类型4'
-        //   }
-        // }
+
         { title: '供应商类型', width: 160, dataIndex: 'cvenCodeType', className: 'replacecolor' },
         { title: '订单类型', width: 90, dataIndex: 'iorderType', className: 'replacecolor' },
         {