Explorar el Código

预托书删除增加判断

jbb hace 2 años
padre
commit
1565eb46e1
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      src/views/pre-book/preBookList.vue

+ 3 - 3
src/views/pre-book/preBookList.vue

@@ -276,9 +276,6 @@ export default {
     // 分页查询 预托书
     getPreBookData() {
       this.$nextTick(() => {
-        if(this.queryParam.pageNo > 1 && this.preBookListData.length === 1){
-          this.queryParam.pageNo = this.queryParam.pageNo -1
-        }
         preBookList(this.queryParam).then(res => {
           if (res.success) {
             this.preBookListData = res.result.records;
@@ -360,6 +357,9 @@ export default {
     //  删除
     handleDelete(record) {
       this.$nextTick(() => {
+        if(this.queryParam.pageNo > 1 && this.preBookListData.length === 1){
+          this.queryParam.pageNo = this.queryParam.pageNo -1
+        }
         deletePreBook({ id: record.id }).then(res => {
           if (res.success) {
           this.getPreBookData()