فهرست منبع

分部加搜索

1
mo 3 سال پیش
والد
کامیت
e40714260e
1فایلهای تغییر یافته به همراه35 افزوده شده و 8 حذف شده
  1. 35 8
      src/views/categroyManager/specialSetup/branchSetting.vue

+ 35 - 8
src/views/categroyManager/specialSetup/branchSetting.vue

@@ -4,7 +4,28 @@
       <div class="squrt"></div>
       分部管理
     </h2>
+
     <div class="m-core">
+      <save-form
+        :inline="true"
+        class="searchForm"
+        saveKey="contentFlashPage"
+        @submit="search"
+        :model="searchForm"
+      >
+        <el-form-item prop="search">
+          <el-input
+            v-model.trim="searchForm.search"
+            clearable
+            @keyup.enter.native="search"
+            placeholder="分部名称、编号"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button native-type="submit" type="danger">搜索</el-button>
+           <el-button @click="onReSet" type="primary">重置</el-button>
+        </el-form-item>
+      </save-form>
       <el-button
         @click="onBranchOperation('create')"
         v-permission="'organization/add'"
@@ -215,10 +236,7 @@
                 <span class="upload-desc">添加上传图片</span>
               </span>
             </el-upload>
-            <div
-              class="tips"
-              style="line-height: 1.3; color: red"
-            >
+            <div class="tips" style="line-height: 1.3; color: red">
               请上传透明背景PNG格式公章图片;<br />
               仅支持图片格式:png,大小:5MB;
             </div>
@@ -249,10 +267,7 @@
                 <span class="upload-desc">添加上传图片</span>
               </span>
             </el-upload>
-            <div
-              class="tips"
-              style="line-height: 1.3; color: red"
-            >
+            <div class="tips" style="line-height: 1.3; color: red">
               请上传透明背景PNG格式公章图片;<br />
               仅支持图片格式:png,大小:5MB;
             </div>
@@ -419,6 +434,9 @@ export default {
       codeStatus: false,
       qrCodeUrl: null,
       codeTitle: "注册二维码",
+      searchForm: {
+        search: "",
+      },
     };
   },
   mounted() {
@@ -426,6 +444,14 @@ export default {
     this.getAreaList();
   },
   methods: {
+    onReSet(){
+      this.searchForm.search = ''
+      this.search();
+    },
+    search() {
+      this.rules.page = 1;
+      this.getList();
+    },
     beforeAvatarUpload(file) {
       const imageType = {
         "image/png": true,
@@ -488,6 +514,7 @@ export default {
       branchQueryPage({
         rows: this.pageInfo.limit,
         page: this.pageInfo.page,
+        ...this.searchForm,
       }).then((res) => {
         if (res.code == 200 && res.data) {
           this.tableList = res.data.rows;