zhouna 5 年 前
コミット
e8f6732e8c
1 ファイル変更15 行追加7 行削除
  1. 15 7
      src/components/qualityControl/StandardRecord.vue

+ 15 - 7
src/components/qualityControl/StandardRecord.vue

@@ -201,6 +201,10 @@
       },
       getDataList(isTurnPage) {
         const param = this.getFilterItems(isTurnPage);
+        if(param.leaveHosDateStart>param.leaveHosDateEnd){
+          this.warning('开始时间不能大于结束时间');
+          return;
+        }
         this.searched = true;
         const loading = this.$loading({
             lock: true,
@@ -209,13 +213,17 @@
             background: 'rgba(0, 0, 0, 0.7)'
         });
         api.getStdList(param).then((res) => {
-          loading.close()
-          let list = res.data.data.records
-          this.list = list;
-          this.total = res.data.data.total;
-          if(this.inCurrentPage!==undefined){
-            this.currentPage=this.inCurrentPage;
-            this.inCurrentPage = undefined;
+          if(res.data.code==="0"){
+            loading.close();
+            let list = res.data.data.records;
+            this.list = list;
+            this.total = res.data.data.total;
+            if(this.inCurrentPage!==undefined){
+              this.currentPage=this.inCurrentPage;
+              this.inCurrentPage = undefined;
+            }
+          }else{
+            this.warning(res.data.msg||'操作失败');
           }
         })
       },