This commit is contained in:
2024-01-23 10:52:49 +08:00
parent 131d230b4d
commit 6b3bacb4d0

View File

@ -31,7 +31,7 @@
<u-input v-model="form.patientName" placeholder="请输入姓名" /> <u-input v-model="form.patientName" placeholder="请输入姓名" />
</view> </view>
</u-form-item> </u-form-item>
<u-form-item prop="sex" :border-bottom="false"> <u-form-item prop="sexname" :border-bottom="false">
<view class="name"> <view class="name">
性别 性别
<view class="sex"> <view class="sex">
@ -190,6 +190,7 @@
cardNo: '', cardNo: '',
patientName: '', patientName: '',
sexname: '', sexname: '',
sex: '',
nation: '', nation: '',
address: '', address: '',
phone: '', phone: '',
@ -510,7 +511,7 @@
message: '请输入姓名', message: '请输入姓名',
trigger: ['change', 'blur'] trigger: ['change', 'blur']
}], }],
sex: [{ sexname: [{
min: 1, min: 1,
required: true, required: true,
message: '请选择性别', message: '请选择性别',
@ -608,6 +609,7 @@
cardNo: this.form.cardNo, cardNo: this.form.cardNo,
patientName: res.data.residentName, patientName: res.data.residentName,
sexname: gender, sexname: gender,
sex: '',
nation: res.data.nation, nation: res.data.nation,
address: res.data.address, address: res.data.address,
phone: res.data.phone, phone: res.data.phone,
@ -619,10 +621,9 @@
areaCode: '', areaCode: '',
} }
} else { } else {
let sex = getSex(this.query.cardNo) let sex = getSex(this.form.cardNo)
sex == '女' ? this.query.sex = 'FEMALE' : sex == '男' ? this.query.sex = 'MALE' : ''
this.form.sexname = sex this.form.sexname = sex
this.query.birthDate = getBirthday(this.query.cardNo) this.form.birthDate = getBirthday(this.form.cardNo)
} }
}) })
} }
@ -696,6 +697,7 @@
} else if (that.form.sexname == '女') { } else if (that.form.sexname == '女') {
that.form.sex = 'FEMALE'; that.form.sex = 'FEMALE';
} }
console.log(that.form)
if (that.form.sex == "") { if (that.form.sex == "") {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '请选择性别', title: '请选择性别',