Browse Source

订单和参照订单加loading

fenghaifu 2 years ago
parent
commit
3e916d0cc9

BIN
dist.zip


+ 13 - 7
src/views/order/orderList.vue

@@ -1,5 +1,6 @@
 c<template>
   <!-- 【单证】 订单数据 -->
+  <a-spin :spinning="spinIsShow" :delay="spinDelayMS">
   <div id="orderList">
     <a-card :bordered="false">
       <!-- 查询区域 -->
@@ -112,6 +113,7 @@ c<template>
     <!-- 订单数据明细 抽屉 -->
     <orderDetail-drawer ref="orderDetailDrawer" :fatherList="getOrderList" @ok="modalFormOk"></orderDetail-drawer>
   </div>
+  </a-spin>
 </template>
 
 <script>
@@ -120,7 +122,6 @@ import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 import OrderDetailDrawer from '@views/order/orderDetailDrawer.vue'
 import { orderList, syncy } from '@api/document/order'
-
 export default {
   name: 'OrderList', // 【单证】 订单数据
   mixins: [JeecgListMixin],
@@ -232,6 +233,8 @@ export default {
       },
       dateRange:[],
       dataRangeMode:['date','date'],
+      spinDelayMS:500, // 加载框延迟时间
+      spinIsShow:false,  // 加载框是否显示
     }
   },
 
@@ -241,28 +244,31 @@ export default {
   methods: {
     // 分页查询
     getOrderList() {
+      var that = this;
+      that.spinIsShow = true;
       this.$nextTick(() => {
         orderList(this.queryParam).then(res => {
+          that.spinIsShow = false;
           if (res.success) {
-            this.orderListData = res.result.records
-            console.log('订单数据列表', this.orderListData)
-            this.pagination = {
+            that.orderListData = res.result.records;
+            that.pagination = {
               total: res.result.total,
               current: res.result.current,
               pageSize: res.result.size
             }
+          }else{
+              that.$message.error(res.message);
           }
+          
         })
       })
     },
     // 同步
     synchronization() {
-      console.log('订单数据--同步')
       this.$nextTick(() => {
         syncy().then(res => {
           if (res.success) {
-            this.getOrderList()
-            console.log('订单数据--同步')
+            this.getOrderList();
           }
         })
       })

+ 2 - 3
src/views/shipment-details/addShipDetDrawer.vue

@@ -612,9 +612,8 @@ export default {
         val[i]['customerOrder'] = val[i].customerOrderNumber
         val[i]['shipmentQuantity'] = val[i].surplusNum // 订单剩余数量 赋值给发货数量
       }
-      this.msgFormSon = val
-      this.syShippingDetailsItemList = this.msgFormSon
-      console.log('新增页 子表信息', this.syShippingDetailsItemList)
+      this.msgFormSon = val;
+      this.syShippingDetailsItemList = this.msgFormSon;
     },
     // 参照订单数据
     referOrderDataOpen() {

+ 4 - 3
src/views/shipment-details/referOrderDataModal.vue

@@ -144,6 +144,7 @@ export default {
         {
           title: '存货名称',
           dataIndex: 'inventoryName',
+          customRender: t => ellipsis(t),
           width: 250,
           className: 'replacecolor'
         },
@@ -349,7 +350,7 @@ export default {
       // 分页
       pagination: {},
       confimList: [], //勾选的订单数组
-      propList: [] //需要给新增页的数据
+      propList: [], //需要给新增页的数据
     }
   },
   // 接收父组件 方法
@@ -361,14 +362,14 @@ export default {
   methods: {
     // 参照订单数据 查询
     getOrderList() {
-      var that = this;
+      this.confirmLoading = true;
       this.$nextTick(() => {
         queryOrderData(this.queryParam).then(res => {
+          this.confirmLoading = false;
           if (res.success) {
             for (var i=0; i<res.result.records.length;i++){
               res.result.records[i].id = randomUUID();
             }
-            console.log(res.result.records);
             this.orderListData = res.result.records
             this.pagination = {
               total: res.result.total,

+ 4 - 1
src/views/shipment-details/shipmentList.vue

@@ -1,4 +1,5 @@
 <template>
+
   <!-- 发运明细 列表 -->
   <div id="ShipmentList">
     <!-- 查询 回显 且 可编辑 -->
@@ -218,6 +219,7 @@
       <itemNumEle-modal ref="itemNumEleModal" :fatherList="getShipmentList"></itemNumEle-modal>
     </div>
   </div>
+
 </template>
 
 <script>
@@ -499,7 +501,8 @@ export default {
         // current: 0,
         // pageSize: 0
       },
-      dateFormat: 'YYYY-MM-DD'
+      dateFormat: 'YYYY-MM-DD',
+      
     }
   },
   created() {