清理idCardNoUtils,改使用ID对象
This commit is contained in:
		| @@ -82,6 +82,7 @@ | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
| import {ID} from "dvcp-ui/lib/js/utils"; | ||||
|  | ||||
| export default { | ||||
|   name: "addVaccination", | ||||
| @@ -183,9 +184,9 @@ export default { | ||||
|       this.form = {...this.form, name, idNumber, phone, areaId, address} | ||||
|     }, | ||||
|     getInfoByIdNumber(code) { | ||||
|       if (this.idCardNoUtil.checkIdCardNo(code)) { | ||||
|         let info = this.idCardNoUtil.getIdCardInfo(code) | ||||
|         this.form.sex = this.dict.getValue('sex', info.gender) | ||||
|       if (ID.check(code)) { | ||||
|         let info = new ID(code) | ||||
|         this.form.sex = info.sex | ||||
|         this.form.birthday = info.birthday | ||||
|         this.$forceUpdate() | ||||
|       } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user