Ver Fonte

新增个人证书自动读取用户身份证号

huangjn há 3 anos atrás
pai
commit
c23b3ff474
1 ficheiros alterados com 9 adições e 0 exclusões
  1. 9 0
      src/views/certificate/lists/addList.vue

+ 9 - 0
src/views/certificate/lists/addList.vue

@@ -111,6 +111,7 @@
           v-model="form.certificateUserId"
           style="width:400px;"
           placeholder="请选择"
+          @change="selectUser"
         >
           <el-option
             v-for="item in userData"
@@ -291,6 +292,14 @@ export default {
     }
   },
   methods: {
+    selectUser(){
+      let _this = this;
+      this.userData.forEach(vo => {
+        if(_this.form.certificateUserId == vo.id){
+          _this.form.certificateId = vo.idNumber;
+        }
+      });
+    },
     async init () {
       if (this.$route.query.id != 0) {
         await this.getById()