jiaxing.zhou

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

- 在 bathDeclareDate 方法调用成功或失败后,传递参数 1 到 cancelModify 方法
- 修改 cancelModify 方法,添加 val 参数以控制是否重新搜索数据
- 在 reportingData/index.vue 中,根据 cancelBatchModify 的参数决定是否搜索数据
......@@ -113,7 +113,7 @@
bathDeclareDate(obj).then((res) => {
if (res.code === "200") {
this.msgSuccess('批量修改成功')
this.cancelModify()
this.cancelModify(1)
} else {
this.alertWarningMsg(res.message);
}
......@@ -122,7 +122,7 @@
.catch((err) => {
console.log(err);
this.alertWarningMsg(err.message);
this.cancelModify()
this.cancelModify(1)
});
} else {
return false;
......@@ -130,9 +130,9 @@
});
},
cancelModify(){
cancelModify(val){
this.batchModifyVisible = false
this.$emit('cancelBatchModify')
this.$emit('cancelBatchModify',val)
}
},
};
......@@ -158,4 +158,3 @@
}
}
</style>
\ No newline at end of file
......
......@@ -983,10 +983,12 @@ export default {
}
this.batchModifyVisible = true
},
cancelBatchModify(){
cancelBatchModify(val){
this.batchModifyVisible = false
if(val === 1){
this.search(0);
}
}
},
};
</script>
......