Kaynağa Gözat

只有上传资料和整改必须在任务进行中的时候才能操作

sunyize 2 yıl önce
ebeveyn
işleme
9e8a2969a8

+ 23 - 2
src/views/lotCheck/modules/TaskCheckList.vue

@@ -471,6 +471,7 @@ export default {
         order: 'asc',
       },
       url: {
+        queryStatusById: "/smsCheck/task/queryStatusById",
         "getInfoDataByInfoId": "/smsTurck/customerData/queryDataLogByInfoId",
         queryTask: "/smsCheck/task/queryById",
         list: "/smsCheck/customerInfo/list",
@@ -765,12 +766,32 @@ export default {
       //关闭当前页面
       this.closeCurrent();
     },
+    queryStatusById (record,info) {
+      let url = this.url.queryStatusById;
+      let params = {
+        id: this.task.id
+      }
+      getAction(url, params).then(res => {
+        if (!res.success) {
+          this.$message.warning(res.message, 3);
+          return
+        }else {
+          if (info=='sc'){
+            this.$router.push({path: '/lot/check/data/upload', query: {id: record.id}});
+          }
+          if (info=='zg'){
+            this.$router.push({path: '/lotCheck/modules/TaskCheckAudit', query: {id: record.id}});
+          }
+        }
+      })
+    },
     // 上传客户资料
     showImproveAndUpload(record){
-      this.$router.push({path: '/lot/check/data/upload', query: {id: record.id}});
+      this.queryStatusById (record,'sc');
     },
     showImproveAndUploadZg(record){
-      this.$router.push({path: '/lotCheck/modules/TaskCheckAudit', query: {id: record.id}});
+      this.queryStatusById (record,'zg');
+
     },
     // 显示完善页面
     showImprove(record) {

+ 24 - 2
src/views/smscheck/modules/TaskCheckList.vue

@@ -459,6 +459,7 @@ export default {
         order: 'asc',
       },
       url: {
+        queryStatusById: "/smsCheck/task/queryStatusById",
         queryTask: "/smsCheck/task/queryById",
         list: "/smsCheck/customerInfo/list",
         count: "/smsCheck/customerInfo/count",
@@ -758,11 +759,11 @@ export default {
     // },
     // 上传客户资料
     showImprove(record) {
-      this.$router.push({path: '/sms/check/TaskUploadData', query: {id: record.id}});
+      this.queryStatusById(record,'sc');
     },
     // 整改
     showImproveGZ(record) {
-      this.$router.push({path: '/sms/check/TaskUploadDataZG', query: {id: record.id}});
+      this.queryStatusById(record,'zg');
     },
 // 历史
     selectData(record) {
@@ -938,6 +939,27 @@ export default {
 
       })
     },
+
+    queryStatusById (record,info) {
+      let url = this.url.queryStatusById;
+      let params = {
+        id: this.task.id
+      }
+      getAction(url, params).then(res => {
+        if (!res.success) {
+          this.$message.warning(res.message, 3);
+          return
+        }else {
+          if (info=='zg'){
+            this.$router.push({path: '/sms/check/TaskUploadDataZG', query: {id: record.id}});
+          }
+          if (info=='sc'){
+            this.$router.push({path: '/sms/check/TaskUploadData', query: {id: record.id}});
+          }
+        }
+      })
+    },
+
     getTaskState(taskState) {
       if (taskState === 0) {
         this.task.taskStateColor = '#fadb14';

+ 27 - 3
src/views/truckCheck/modules/TaskCheckList.vue

@@ -478,6 +478,7 @@ export default {
         order: 'asc',
       },
       url: {
+        queryStatusById: "/smsCheck/task/queryStatusById",
         deleteBatch : "smsCheck/customerInfo/deleteBatch",
         queryTask: "/smsCheck/task/queryById",
         list: "/smsCheck/customerInfo/list",
@@ -745,7 +746,8 @@ export default {
     },
     // 整改
     showImproveGZ(record) {
-      this.$router.push({path: '/truckCheck/modules/TaskCheckAudit', query: {id: record.id}});
+      this.queryStatusById (record,'zg');
+
     },
 // 历史
     selectData(record) {
@@ -778,13 +780,35 @@ export default {
       //关闭当前页面
       this.closeCurrent();
     },
+    queryStatusById (record,info) {
+      let url = this.url.queryStatusById;
+      let params = {
+        id: this.task.id
+      }
+      getAction(url, params).then(res => {
+        if (!res.success) {
+          this.$message.warning(res.message, 3);
+          return
+        }else {
+          if (info=='sc'){
+            this.$router.push({path: '/truck/check/data/upload', query: {id: record.id}});
+          }
+          if (info=='ws'){
+            this.$router.push({path: '/sms/check/data/edit', query: {id: record.id}});
+          }
+          if (info=='zg'){
+            this.$router.push({path: '/truckCheck/modules/TaskCheckAudit', query: {id: record.id}});
+          }
+        }
+      })
+    },
     // 上传客户资料
     showImproveAndUpload(record){
-      this.$router.push({path: '/truck/check/data/upload', query: {id: record.id}});
+      this.queryStatusById (record,'sc');
     },
     // 显示完善页面
     showImprove(record) {
-      this.$router.push({path: '/sms/check/data/edit', query: {id: record.id}});
+      this.queryStatusById (record,'ws');
     },
     // 显示上传页面
     showUpload(record) {