Przeglądaj źródła

修改变更管理搜索

huzhiz 1 rok temu
rodzic
commit
e96ee1790d
1 zmienionych plików z 77 dodań i 80 usunięć
  1. 77 80
      src/views/changeManage/components/searchTable.vue

+ 77 - 80
src/views/changeManage/components/searchTable.vue

@@ -1,96 +1,93 @@
 <!-- 搜索表单 -->
 <template>
-  <el-form
-    label-width="100px"
-    class="ele-form-search"
-    @keyup.enter.native="search"
-    @submit.native.prevent
-  >
-    <el-row :gutter="15">
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="编码:" prop="changeCode">
-          <el-input
-            clearable
-            placeholder="请输入"
-            v-model.trim="params.changeCode"
-          ></el-input>
-        </el-form-item>
-      </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="来源类型" prop="relationType">
-          <el-select v-model="params.relationType" style="width: 100%">
-            <el-option
-              :value="item.value"
-              :label="item.label"
-              v-for="(item, index) in relationTypeList"
-              :key="index"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-      </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="来源编码" prop="relationCode">
-          <el-input
-            clearable
-            placeholder="请输入"
-            v-model.trim="params.relationCode"
-          ></el-input>
-        </el-form-item>
-      </el-col>
-      <el-col
-        style="display: flex; justify-content: end"
-        v-bind="styleResponsive ? { lg: 6, md: 6 } : { span: 6 }"
-      >
-        <div class="ele-form-actions">
-          <el-button
-            type="primary"
-            icon="el-icon-search"
-            class="ele-btn-icon"
-            @click="search"
-          >
-            查询
-          </el-button>
-          <el-button @click="reset">重置</el-button>
-        </div>
-      </el-col>
-    </el-row>
-  </el-form>
+  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
 </template>
 <script>
-  import { relationTypeList } from '@/enum/dict.js';
-
+  import { reviewStatusSelect, relationTypeList } from '@/enum/dict';
   export default {
     data() {
-      // 默认表单数据
-      const defaultParams = {
-        changeCode: '',
-        relationCode: '',
-        relationType: ''
-      };
-      return {
-        defaultParams,
-        // 表单数据
-        params: { ...defaultParams },
-        relationTypeList
-      };
+      return {};
     },
     computed: {
-      // 是否开启响应式布局
-      styleResponsive() {
-        return this.$store.state.theme.styleResponsive;
+      // 表格列配置
+      seekList() {
+        return [
+          {
+            label: '关键字:',
+            value: 'searchName',
+            width: 380,
+            type: 'input',
+            placeholder: '来源编码/来源名称'
+          },
+          {
+            label: '来源编码:',
+            value: 'relationCode',
+            width: 380,
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '来源类型:',
+            value: 'relationType',
+            width: 380,
+            type: 'select',
+            planList: relationTypeList,
+            placeholder: '请选择'
+          },
+          {
+            label: '来源名称:',
+            value: 'relationName',
+            width: 380,
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '变更原因:',
+            value: 'reason',
+            width: 380,
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '变更描述:',
+            value: 'remark',
+            width: 380,
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '审核状态:',
+            value: 'approvalStatus',
+            width: 380,
+            type: 'select',
+            planList: reviewStatusSelect,
+            placeholder: '请选择审核状态'
+          },
+          {
+            label: '创建人:',
+            value: 'createUserName',
+            width: 380,
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '创建时间:',
+            value: 'createTime',
+            type: 'date',
+            dateType: 'datetimerange',
+            placeholder: '',
+            width: 380,
+            valueAr: ['createTimeStart', 'createTimeEnd']
+          }
+        ];
       }
     },
     methods: {
-      search() {
+      /* 搜索 */
+      search(e) {
         this.$emit('search', {
-          ...this.params
+          ...e
         });
-      },
-      /*  重置 */
-      reset() {
-        this.createTime = [];
-        this.params = Object.assign({}, { ...this.defaultParams });
-        this.search();
       }
     }
   };