Ver código fonte

表格加载中

chenrui 3 anos atrás
pai
commit
b3f748c29b

+ 4 - 0
src/views/allocationManagement/transferOut/edit.vue

@@ -112,6 +112,7 @@
               :columns="chooseColumns"
               :dataSource="chooseLoadData"
               :scroll="{ x: 1335, y: 300 }"
+              :loading="loading"
               :pagination="choosePaginationProps"
               bordered>
               <!-- 调出数量 -->
@@ -170,6 +171,7 @@ export default {
         productName: ''
       },
       disabled: false, //  查询、重置按钮是否可操作
+      loading: false,
       chooseDisabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
       productBrandList: [], //  产品品牌  下拉数据
@@ -367,12 +369,14 @@ export default {
     getChooseProductList (pageNo) {
       this.choosePageNo = this.choosePageNo || pageNo
       this.chooseDisabled = true
+      this.loading = true
       const params = {
         pageNo: this.choosePageNo,
         pageSize: this.choosePageSize,
         allocateSn: this.$route.params.sn
       }
       allocateBillDetailList(Object.assign(params, this.chooseQueryParam)).then(res => {
+        this.loading = false
         if (res.status == 200) {
           //  合计
           this.getDetailCount(Object.assign(params, this.chooseQueryParam))

+ 5 - 1
src/views/inventoryManagement/intelligentReplenishment/detailModal.vue

@@ -22,6 +22,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data-source="loadData"
+          :loading="loading"
           :scroll="{ y: 400 }"
           :pagination="false"
           bordered>
@@ -73,7 +74,8 @@ export default {
         { title: '类型名称', dataIndex: 'rangeDataName', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       loadData: [],
-      detailData: null
+      detailData: null,
+      loading: false
     }
   },
   methods: {
@@ -92,7 +94,9 @@ export default {
     },
     // 获取产品范围
     getPredictRange () {
+      this.loading = true
       predictRangeList({ 'sn': this.detailData.stockPredictSn }).then(res => {
+        this.loading = false
         if (res.status == 200) {
           res.data.map((item, index) => {
             item.no = index + 1

+ 1 - 1
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -254,6 +254,7 @@ export default {
       const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
       this.tableLoading = true
       stockWarnList(params).then(res => {
+        this.tableLoading = false
         if (res.status == 200) {
           const data = res.data
           this.paginationProps.total = Number(res.data.count) || 0
@@ -263,7 +264,6 @@ export default {
             data.list[i].no = no + i + 1
           }
           this.loadData = data.list
-          this.tableLoading = false
           this.disabled = false
         } else {
           this.paginationProps.total = 0