Просмотр исходного кода

订单查询添加机构名称搜索字段

lihongxiao 3 лет назад
Родитель
Сommit
5405a9c962
1 измененных файлов с 22 добавлено и 1 удалено
  1. 22 1
      src/views/Letter/Orderlist.vue

+ 22 - 1
src/views/Letter/Orderlist.vue

@@ -23,6 +23,17 @@
             <el-input v-model="pageRequest.insuredName" placeholder="请输入投保人姓名" class="widths"></el-input>
           </el-form-item>
         </el-col>
+        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" >
+          <el-form-item label="机构名称">
+            <el-cascader
+              :options="institutionOptions"
+              v-model="pageRequest.deptId"
+              :props="{ checkStrictly: true,  value: 'id',
+                      label: 'name', }"
+              @change="handleChange"
+              clearable></el-cascader>
+          </el-form-item>
+        </el-col>
         <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" >
           <el-form-item label="订单状态">
             <el-select v-model="pageRequest.orderStatus" class="widths">
@@ -42,7 +53,7 @@
 
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6" >
+        <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="3" >
           <el-button type="primary" size="small" @click="onSubmit">查询</el-button>
         </el-col>
       </el-row>
@@ -1049,11 +1060,15 @@ export default {
       userid: "",
       downloadstatus: 0,
       expands: [],
+      institutionOptions:[],
       width: document.documentElement.clientWidth,
     }
   },
   created() {
     this.peopleid = Cookies.get('user');
+    this.$api.dept.findDeptTree().then((res) => {
+        this.institutionOptions = res.data;
+      });
     if (this.peopleid != 'admin') {
       this.pageRequest.userId = this.peopleid;
       this.findPage();
@@ -1095,6 +1110,12 @@ export default {
     },
   },
   methods: {
+     //联级选择器触发事件
+     handleChange(val) {
+      if (val.length !== 0) {
+        this.pageRequest.deptId = val.at(-1);
+      }
+    },
     getDimensions() {
       this.width = document.documentElement.clientWidth - 350 + 'px';
     },