소스 검색

订单数据--单证 部分代码调整

liangy 3 년 전
부모
커밋
40acaaff1d
4개의 변경된 파일79개의 추가작업 그리고 22개의 파일을 삭제
  1. 1 1
      .env.production
  2. 2 0
      src/api/document/order.js
  3. 42 7
      src/views/order/orderDetailDrawer.vue
  4. 34 14
      src/views/order/orderList.vue

+ 1 - 1
.env.production

@@ -1,4 +1,4 @@
 NODE_ENV=production
-VUE_APP_API_BASE_URL=http://localhost:8080/jeecg-boot
+VUE_APP_API_BASE_URL=http://220.191.168.86:18001/jeecg-boot
 VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
 VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

+ 2 - 0
src/api/document/order.js

@@ -8,4 +8,6 @@ const orderList = params => getAction('/orderData/syOrderData/list', params)
 // 根据订单号查询 (详情)
 const orderByNum = params => getAction('/orderData/syOrderDataItem/list', params)
 
+//同步
+
 export { orderList, orderByNum }

+ 42 - 7
src/views/order/orderDetailDrawer.vue

@@ -156,6 +156,8 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
+import { orderByNum } from '@api/document/order'
+
 export default {
   name: 'OrderList',
   mixins: [JeecgListMixin],
@@ -188,7 +190,7 @@ export default {
           },
           className: 'replacecolor'
         },
-        { title: 'Pack Id', width: 100, dataIndex: 'packId', className: 'replacecolor' },
+        { title: 'Pack Id', width: 120, dataIndex: 'packId', className: 'replacecolor' },
         { title: '小po', width: 100, dataIndex: 'smallPo', className: 'replacecolor' },
         { title: '分销点', width: 150, dataIndex: 'distributionPoint', className: 'replacecolor' },
         { title: '存货编码', width: 120, dataIndex: 'inventoryCode', className: 'replacecolor' },
@@ -220,14 +222,46 @@ export default {
       // 分页
       pagination: {
         // total: '',
-        // current: 0,
-        // pageSize: 0
+        // current: '',
+        // pageSize: ''
       },
-      dateFormat: 'YYYY-MM-DD'
+      dateFormat: 'YYYY-MM-DD',
+      record: {} //点击的订单对象
     }
   },
-  created() {},
+  // 接收父组件查询方法
+  // props: {
+  //   fatherList: {
+  //     type: Function,
+  //     default: null
+  //   }
+  // },
+  created() {
+    console.log('详情created0')
+    this.getOrderChild()
+    console.log('详情created1')
+  },
   methods: {
+    // 子表信息获取
+    getOrderChild() {
+      this.$nextTick(() => {
+        console.log('详情拿到订单号', record.orderNumber)
+        orderByNum({ orderNumber: record.orderNumber }).then(res => {
+          if (res.success) {
+            // 子表信息赋值
+            this.childData = res.result.records
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+            console.log('childData', this.childData)
+            console.log('分页信息:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
+          }
+        })
+      })
+    },
+
     // 回显主表信息 正常应该通过id查询
     onClose() {
       // 关闭抽屉
@@ -240,8 +274,9 @@ export default {
         this.isorter.column = sorter.field
         this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
       }
-      this.queryParam.pageNo = pagination.current
-      // this.getOrderList()
+      console.log('详情 分页000')
+      this.getOrderChild()
+      console.log('详情 分页111')
     }
   },
   computed: {},

+ 34 - 14
src/views/order/orderList.vue

@@ -89,7 +89,7 @@
       </div>
     </a-card>
     <!-- 订单数据明细 抽屉 -->
-    <orderDetail-drawer ref="orderDetailDrawer" @ok="modalFormOk"></orderDetail-drawer>
+    <orderDetail-drawer ref="orderDetailDrawer" :fatherList="getOrderList" @ok="modalFormOk"></orderDetail-drawer>
   </div>
 </template>
 
@@ -113,10 +113,11 @@ export default {
       orderLIstColumns: [
         {
           title: '订单号',
-          width: 140,
+          width: 180,
           dataIndex: 'orderNumber',
           fixed: 'left',
           className: 'replacecolor',
+          // customRender: t => ellipsis(t),
           customCell: this.showDrawer,
           scopedSlots: { customRender: 'orderNumber' }
         },
@@ -212,7 +213,7 @@ export default {
         orderList(this.queryParam).then(res => {
           if (res.success) {
             this.orderListData = res.result.records
-            console.log('订单数据列表', this.orderListData)
+            // console.log('订单数据列表', this.orderListData)s
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
@@ -222,11 +223,13 @@ export default {
         })
       })
     },
+
     // 查询按钮
     searchQuery() {
       this.getOrderList()
       console.log('发货状态', this.queryParam.dilivery)
     },
+
     searchReset() {
       // console.log('>>>>重置')
       this.queryParam = {}
@@ -238,18 +241,33 @@ export default {
       return {
         on: {
           click: event => {
-            console.log('点击的订单号', record.orderNumber)
+            // console.log('点击的订单号', record.orderNumber)
             this.$refs.orderDetailDrawer.visible = true
+            this.$refs.orderDetailDrawer.record = record
+            this.$refs.orderDetailDrawer.getOrderChild()
+            console.log('---', this.$refs.orderDetailDrawer.record)
+            console.log('打开订单详情')
             // 子表信息获取
-            orderByNum({ orderNumber: record.orderNumber }).then(res => {
-              if (res.success) {
-                console.log('子表详情', res.result)
-                // 子表信息赋值
-                this.$refs.orderDetailDrawer.childData = res.result
-                console.log('主表信息', record)
-                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
+            //   }
+            // })
           }
         }
       }
@@ -262,7 +280,7 @@ export default {
     },
     // 同步
     synchronization() {
-      console.log('订单数据--同步');
+      console.log('订单数据--同步')
     },
 
     // 分页变化时触发
@@ -273,7 +291,9 @@ export default {
         this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
       }
       this.queryParam.pageNo = pagination.current
+      // console.log('00');
       this.getOrderList() //重新渲染
+      // console.log('\\\\');
     }
   },
   computed: {},