Jelajahi Sumber

查重调整

qymljy 1 tahun lalu
induk
melakukan
3e4647c379

+ 16 - 11
src/components/duplicatesCheck/competitorCheck.vue

@@ -68,21 +68,26 @@ export default {
       this.param.content.sa_competitorid = this.data.sa_competitorid || 0
       this.param.content.enterprisename = this.data.enterprisename
       const res = await this.$api.requested(this.param)
-      if (res.total > 0){
-        this.list = res.data
-        this.total = res.total
-        this.currentPage = res.pageNumber
-        this.dialogTableVisible = true
+      if (res.code == 0){
+        this.tool.showMessage(res)
       }else {
-        if (this.creatShow){
-          this.onSubmit()
+        if (res.total > 0){
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          this.dialogTableVisible = true
         }else {
-          this.$message({
-            message: '无重复数据',
-            type: 'success'
-          });
+          if (this.creatShow){
+            this.onSubmit()
+          }else {
+            this.$message({
+              message: '无重复数据',
+              type: 'success'
+            });
+          }
         }
       }
+
     },
     onCheck(){
       if (this.buttonTitle === '确定保存'){

+ 16 - 11
src/components/duplicatesCheck/customerChangeCheck.vue

@@ -87,21 +87,26 @@ export default {
         this.param.content[item] = this.data[item] || ""
       })
       const res = await this.$api.requested(this.param)
-      if (res.total > 0){
-        this.list = res.data
-        this.total = res.total
-        this.currentPage = res.pageNumber
-        this.dialogTableVisible = true
+      if (res.code == 0){
+        this.tool.showMessage(res)
       }else {
-        if (this.creatShow){
-          this.onSubmit()
+        if (res.total > 0){
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          this.dialogTableVisible = true
         }else {
-          this.$message({
-            message: '无重复数据',
-            type: 'success'
-          });
+          if (this.creatShow){
+            this.onSubmit()
+          }else {
+            this.$message({
+              message: '无重复数据',
+              type: 'success'
+            });
+          }
         }
       }
+
     },
     onCheck(){
       if (this.buttonTitle === '确定保存'){

+ 22 - 17
src/components/duplicatesCheck/customerCheck.vue

@@ -100,27 +100,32 @@ export default {
         this.param.content[item] = this.data[item] || ""
       })
       const res = await this.$api.requested(this.param)
-      if (res.total > 0){
-        this.list = res.data
-        this.total = res.total
-        this.currentPage = res.pageNumber
-        this.list.forEach(item=>{
-          this.isBack = false
-          if (item.systemapp === '回收站'){
-            this.isBack = true
-          }
-        })
-        this.dialogTableVisible = true
+      if (res.code == 0){
+        this.tool.showMessage(res)
       }else {
-        if (this.creatShow){
-          this.onSubmit()
+        if (res.total > 0){
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          this.list.forEach(item=>{
+            this.isBack = false
+            if (item.systemapp === '回收站'){
+              this.isBack = true
+            }
+          })
+          this.dialogTableVisible = true
         }else {
-          this.$message({
-            message: '无重复数据',
-            type: 'success'
-          });
+          if (this.creatShow){
+            this.onSubmit()
+          }else {
+            this.$message({
+              message: '无重复数据',
+              type: 'success'
+            });
+          }
         }
       }
+
     },
     onCheck(){
       if (this.buttonTitle === '确定保存'){

+ 16 - 11
src/components/duplicatesCheck/projectChangeCheck.vue

@@ -87,21 +87,26 @@ export default {
         this.param.content[item] = this.data[item] || ""
       })
       const res = await this.$api.requested(this.param)
-      if (res.total > 0){
-        this.list = res.data
-        this.total = res.total
-        this.currentPage = res.pageNumber
-        this.dialogTableVisible = true
+      if (res.code == 0){
+        this.tool.showMessage(res)
       }else {
-        if (this.creatShow){
-          this.onSubmit()
+        if (res.total > 0){
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          this.dialogTableVisible = true
         }else {
-          this.$message({
-            message: '无重复数据',
-            type: 'success'
-          });
+          if (this.creatShow){
+            this.onSubmit()
+          }else {
+            this.$message({
+              message: '无重复数据',
+              type: 'success'
+            });
+          }
         }
       }
+
     },
     onCheck(){
       if (this.buttonTitle === '确定保存'){

+ 20 - 16
src/components/duplicatesCheck/projectCheck.vue

@@ -88,26 +88,30 @@ export default {
         this.param.content[item] = this.data[item] || ""
       })
       const res = await this.$api.requested(this.param)
-      if (res.total > 0){
-        this.list = res.data
-        this.total = res.total
-        this.currentPage = res.pageNumber
-        if (this.siteid == 'HY'){
-          this.onCheck()
-        }else {
-          this.dialogTableVisible = true
-        }
-
+      if (res.code == 0){
+        this.tool.showMessage(res)
       }else {
-        if (this.creatShow){
-          this.onSubmit()
+        if (res.total > 0){
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          if (this.siteid == 'HY'){
+            this.onCheck()
+          }else {
+            this.dialogTableVisible = true
+          }
         }else {
-          this.$message({
-            message: '无重复数据',
-            type: 'success'
-          });
+          if (this.creatShow){
+            this.onSubmit()
+          }else {
+            this.$message({
+              message: '无重复数据',
+              type: 'success'
+            });
+          }
         }
       }
+
     },
     onCheck(){
       if (this.buttonTitle === '确定保存'){

+ 14 - 9
src/components/duplicatesCheck/projectRecovery.vue

@@ -86,18 +86,23 @@ export default {
         this.param.content[item] = this.data[item] || ""
       })
       const res = await this.$api.requested(this.param)
-      if (res.total > 0){
-        this.list = res.data
-        this.total = res.total
-        this.currentPage = res.pageNumber
-        this.dialogTableVisible = true
+      if (res.code == 0){
+        this.tool.showMessage(res)
       }else {
-        if (this.creatShow){
-          this.onSubmit()
+        if (res.total > 0){
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          this.dialogTableVisible = true
         }else {
-          this.onRecovery()
+          if (this.creatShow){
+            this.onSubmit()
+          }else {
+            this.onRecovery()
+          }
         }
       }
+
     },
     onCheck(){
       this.message = '该项目疑似重复,是否确认恢复项目?'
@@ -230,4 +235,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 22 - 17
src/components/duplicatesCheck/publicCustomerCheck.vue

@@ -101,27 +101,32 @@ export default {
         this.param.content[item] = this.data[item] || ""
       })
       const res = await this.$api.requested(this.param)
-      if (res.total > 0){
-        this.list = res.data
-        this.total = res.total
-        this.currentPage = res.pageNumber
-        this.list.forEach(item=>{
-          this.isBack = false
-          if (item.systemapp === '回收站'){
-            this.isBack = true
-          }
-        })
-        this.dialogTableVisible = true
+      if (res.code == 0){
+        this.tool.showMessage(res)
       }else {
-        if (this.creatShow){
-          this.onSubmit()
+        if (res.total > 0){
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          this.list.forEach(item=>{
+            this.isBack = false
+            if (item.systemapp === '回收站'){
+              this.isBack = true
+            }
+          })
+          this.dialogTableVisible = true
         }else {
-          this.$message({
-            message: '无重复数据',
-            type: 'success'
-          });
+          if (this.creatShow){
+            this.onSubmit()
+          }else {
+            this.$message({
+              message: '无重复数据',
+              type: 'success'
+            });
+          }
         }
       }
+
     },
     onCheck(){
       if (this.buttonTitle === '确定保存'){