Kaynağa Gözat

对账管理-提示显示频繁

dujingxian 4 yıl önce
ebeveyn
işleme
c4015288e8

+ 6 - 2
src/pages/subPages/balance.vue

@@ -53,7 +53,7 @@
     <!-- <el-header height="40px" style="border-bottom: 1px solid #eee">余额充值</el-header> -->
     <div style="margin-bottom:20px;">
         <el-date-picker v-model="dataRange" :clearable="false" value-format="timestamp" format="yyyy-MM-dd" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width:260px;"></el-date-picker>
-        <el-button style="margin-left:10px;" type="primary" @click="onSearch">查询</el-button>
+        <el-button style="margin-left:10px;" type="primary" @click="onSearch" :loading="searchLoading">查询</el-button>
         <el-button style="margin-left:10px;" type="danger" @click="onReset">重置</el-button>
         <el-button style="margin-left:10px;" type="warning" @click="onRecharge">充值申请提交</el-button>
     </div>
@@ -237,7 +237,8 @@ export default {
             // 预警电话列表
             warningList: [],
             // 总充值金额
-            evidence_amounts: ''
+            evidence_amounts: '',
+            searchLoading: false
         };
     },
     mounted() {
@@ -353,6 +354,7 @@ export default {
         // 搜索
         async onSearch() {
             this.isLoading = true
+            this.searchLoading = true
             try {
                 if (this.dataRange == null) {
                     this.startTime = ''
@@ -373,9 +375,11 @@ export default {
                     this.total = res.datas.total * this.pageSize
                 }
                 this.isLoading = false
+                this.searchLoading = false
             } catch (error) {
                 console.log(error);
                 this.isLoading = false
+                this.searchLoading = false
             }
         },
         // 重置

+ 14 - 1
src/pages/subPages/reconciliation.vue

@@ -20,7 +20,7 @@
             start-placeholder="开始日期" end-placeholder="结束日期" style="width:260px;"
             @focus="hFocusDate"
             :disabled="isDisabled"></el-date-picker>
-          <el-button style="margin-left:10px;" type="primary" @click="onSearch">查询</el-button>
+          <el-button style="margin-left:10px;" type="primary" @click="onSearch" :loading="searchLoading">查询</el-button>
           <el-button style="margin-left:10px;" type="danger" @click="onReset">重置</el-button>
       </div>
       <!-- <el-form :model="recForm">
@@ -85,6 +85,7 @@ export default {
       isDisabled: false,
       tableData: [],
       isLoading: false,
+      searchLoading: false
     }
   },
   created() {
@@ -114,6 +115,16 @@ export default {
     // 查询
     async onSearch() {
       try {
+        if (!this.value) {
+          if (this.timer) {
+            window.clearTimeout(this.timer)
+          }
+          this.timer = setTimeout(() => {
+            this.$message.warning('请选择日期类型')
+          }, 1000)
+          return
+        }
+        this.searchLoading = true
         this.isLoading = true
         this.startTime = this.dataRange[0]/1000
         this.endTime = this.dataRange[1]/1000
@@ -134,9 +145,11 @@ export default {
           }
         }
         this.isLoading =  false
+        this.searchLoading = false
       } catch (error) {
         console.log(error);
         this.isLoading =  false
+        this.searchLoading = false
       }
     },
     // 重置