浏览代码

feat(盘点工单): 添加搜索功能并优化对话框关闭逻辑

liujt 4 月之前
父节点
当前提交
bd66610265
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      src/views/warehouseManagement/stocktaking/work/components/disposeDialog.vue

+ 10 - 1
src/views/warehouseManagement/stocktaking/work/components/disposeDialog.vue

@@ -4,6 +4,7 @@
       :title="`处理工单`"
       append-to-body
       :visible.sync="visibleDialog"
+      destroy-on-close
       @close="closeWindows"
       width="80vw"
       :maxable="true"
@@ -17,7 +18,7 @@
               v-model="keyWord"
               class="input-with-select"
             >
-              <el-button slot="append" icon="el-icon-search">搜索</el-button>
+              <el-button slot="append" icon="el-icon-search" @click="search">搜索</el-button>
             </el-input>
             <el-button type="primary" @click="control">处理</el-button>
           </div>
@@ -316,6 +317,12 @@
       this.getFieldModel();
     },
     methods: {
+      // 搜索
+      search() {
+        this.pages.keyWord = this.keyWord;
+        this.pages.pageNum = 1;
+        this._getInformation();
+      },
       control() {
         if (this.selection.length > 0) {
           console.log(this.selection);
@@ -447,6 +454,8 @@
         this.selection = val;
       },
       closeWindows() {
+        this.keyWord = '';
+        this.pages.keyWord = '';
         this.selection = [];
         this.visibleDialog = false;
       },