|
|
|
@ -81,9 +81,10 @@ |
|
|
|
<el-form-item label="出生日期" prop="birthDate"> |
|
|
|
<el-date-picker |
|
|
|
v-model="form.birthDate" |
|
|
|
type="date" |
|
|
|
type="date" value-format="yyyy-MM-dd" |
|
|
|
placeholder="出生日期" |
|
|
|
style="width: 135px" |
|
|
|
@change="changeBirthDate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -167,6 +168,7 @@ |
|
|
|
<el-form-item label="身份证号" prop="idNo"> |
|
|
|
<el-input |
|
|
|
v-model="form.idNo" |
|
|
|
@change="changeIdNo" |
|
|
|
@blur="query(form.idNo)" |
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -412,8 +414,7 @@ |
|
|
|
</div> |
|
|
|
<div class="btn"> |
|
|
|
<el-button type="primary" @click="openCamera" icon="el-icon-camera" |
|
|
|
>拍照</el-button |
|
|
|
> |
|
|
|
>拍照</el-button> |
|
|
|
</div> |
|
|
|
<div class="btn"> |
|
|
|
<el-button type="primary">申请单</el-button> |
|
|
|
@ -473,14 +474,7 @@ |
|
|
|
<el-table-column prop="maritalStatusId" label="婚姻"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ |
|
|
|
ldddw( |
|
|
|
dict.maritalStatus, |
|
|
|
"id", |
|
|
|
scope.row.maritalStatusId, |
|
|
|
"displayName" |
|
|
|
) |
|
|
|
}} |
|
|
|
{{ ldddw(dict.maritalStatus,"id",scope.row.maritalStatusId,"displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -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为空则新增 |
|
|
|
|