Selaa lähdekoodia

成分分配表加载状态

jbb 2 vuotta sitten
vanhempi
commit
bd42a78446
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 6 0
      src/views/reportForms/cost-allocation-table.vue

+ 6 - 0
src/views/reportForms/cost-allocation-table.vue

@@ -14,6 +14,7 @@
                   enter-button
                   v-model="detailsPlanNum.planNum"
                   @search="onSearch"
+                  :loading="this.loading"
                 />
               </a-form-model-item>
             </a-col>
@@ -326,8 +327,10 @@ export default {
     onSearch() {
       this.$nextTick(() => {
         // TODO:接口完善后,type 应改为 add(暂时为了回显数据)
+        this.loading = true
         seachPlanNum({ plannum: this.detailsPlanNum.planNum, type: 'query' }).then(res => {
           if (res.success) {
+             this.loading = false
             this.detailsPlanNum = res.result //所有详情
             this.accidentListData = res.result.syCostAllocationAccidentList //事故单
             this.costPayData = res.result.syCostAllocationCostpayList //支出费用
@@ -352,6 +355,9 @@ export default {
               current: res.result.current,
               pageSize: res.result.size
             }
+          }else {
+            THIS.loading = false
+            this.$message.error(res.message);
           }
         })
       })