From 56d8d3061ff86409d0197ba82422c9845b400088 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Tue, 25 Jul 2023 16:21:08 +0800 Subject: [PATCH] dj --- .../patientRegister/PatientRegisterEdit.vue | 49 +++++++++++-------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 9395b48..0765dfb 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -81,9 +81,10 @@ @@ -167,6 +168,7 @@ @@ -412,8 +414,7 @@
拍照 + >拍照
申请单 @@ -473,14 +474,7 @@ @@ -526,7 +520,7 @@ import { mapState } from "vuex"; import { getapi, postapi, putapi, deletapi } from "@/api/api"; import mm from "../../utlis/mm"; -import { objCopy, setNull, dddw } from "../../utlis/proFunc"; +import { objCopy, setNull, dddw,parseID,birthdayToAge } from "../../utlis/proFunc"; import Camera from "./Camera.vue"; import PatientRegisterItem from "./PatientRegisterItem.vue"; export default { @@ -629,6 +623,21 @@ export default { console.log("this.form1", this.form); }, + //修改出生日期 + changeBirthDate(){ + this.form.age = birthdayToAge(this.form.birthDate) + }, + + //修改身份证,生成年龄、出生、性别 + changeIdNo(){ + let ret = parseID(this.form.idNo) + if(ret.age != -1){ + this.form.birthDate = ret.birthday + this.form.age = ret.age + this.form.sexId = ret.sex + } + }, + //分组改变时触发 changeCustomerOrgGroupId() { this.patientRegister.customerOrgGroupChange++; @@ -711,13 +720,13 @@ export default { setNull(body, this.defaultNull); - //日期转换 - console.log("body.birthDate", body.birthDate); - if (body.birthDate) { - body.birthDate = moment(new Date(body.birthDate)).format( - "yyyy-MM-DD" - ); - } + //日期转换 日期控件增加格式 + // console.log("body.birthDate", body.birthDate); + // if (body.birthDate) { + // body.birthDate = moment(new Date(body.birthDate)).format( + // "yyyy-MM-DD" + // ); + // } if (this.form.id.length < 1) { //id为空则新增