jiaxing.zhou

refactor(reportingData): 优化批量修改功能

- 在 bathDeclareDate 方法调用成功或失败后,传递参数 1 到 cancelModify 方法
- 修改 cancelModify 方法,添加 val 参数以控制是否重新搜索数据
- 在 reportingData/index.vue 中,根据 cancelBatchModify 的参数决定是否搜索数据
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
113 bathDeclareDate(obj).then((res) => { 113 bathDeclareDate(obj).then((res) => {
114 if (res.code === "200") { 114 if (res.code === "200") {
115 this.msgSuccess('批量修改成功') 115 this.msgSuccess('批量修改成功')
116 - this.cancelModify() 116 + this.cancelModify(1)
117 } else { 117 } else {
118 this.alertWarningMsg(res.message); 118 this.alertWarningMsg(res.message);
119 } 119 }
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
122 .catch((err) => { 122 .catch((err) => {
123 console.log(err); 123 console.log(err);
124 this.alertWarningMsg(err.message); 124 this.alertWarningMsg(err.message);
125 - this.cancelModify() 125 + this.cancelModify(1)
126 }); 126 });
127 } else { 127 } else {
128 return false; 128 return false;
...@@ -130,9 +130,9 @@ ...@@ -130,9 +130,9 @@
130 }); 130 });
131 }, 131 },
132 132
133 - cancelModify(){ 133 + cancelModify(val){
134 this.batchModifyVisible = false 134 this.batchModifyVisible = false
135 - this.$emit('cancelBatchModify') 135 + this.$emit('cancelBatchModify',val)
136 } 136 }
137 }, 137 },
138 }; 138 };
...@@ -158,4 +158,3 @@ ...@@ -158,4 +158,3 @@
158 } 158 }
159 } 159 }
160 </style> 160 </style>
161 -
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -983,10 +983,12 @@ export default { ...@@ -983,10 +983,12 @@ export default {
983 } 983 }
984 this.batchModifyVisible = true 984 this.batchModifyVisible = true
985 }, 985 },
986 - cancelBatchModify(){ 986 + cancelBatchModify(val){
987 this.batchModifyVisible = false 987 this.batchModifyVisible = false
988 + if(val === 1){
988 this.search(0); 989 this.search(0);
989 } 990 }
991 + }
990 }, 992 },
991 }; 993 };
992 </script> 994 </script>
......