Commit f809fc3f by 潘琦

添加家庭成员添加配偶末次月经时间月日小于10需补0;

parent 4b6f631f
......@@ -63,7 +63,7 @@
<div class="tr">
<div class="td label">身份证号</div>
<div class="td text-right">
<input type="text" class="form-control" placeholder="请输入子女有效身份证" v-model="userData.idCardKid"/>
<input type="text" class="form-control" placeholder="请输入子女有效身份证[非必填]" v-model="userData.idCardKid"/>
<span v-show="!BaseValidate.idCardKidState" class="small-hint">请输入子女有效身份证</span>
</div>
</div>
......
......@@ -267,10 +267,14 @@ export default {
lastMensesTimePickerConfirm (date) { // 末次月经日期控件“确认”事件
const selectedDate = new Date(date)
let month = selectedDate.getMonth() + 1
let day = selectedDate.getDate()
if (selectedDate.getMonth() + 1 <= 9) {
month = '0' + (selectedDate.getMonth() + 1)
}
this.userData.lastMensesTime = selectedDate.getFullYear() + '-' + month + '-' + selectedDate.getDate()
if (selectedDate.getDate() <= 9) {
day = '0' + selectedDate.getDate()
}
this.userData.lastMensesTime = selectedDate.getFullYear() + '-' + month + '-' + day
},
pictureChange () { // 头部头像根据角色、性别不同变换头像
if (this.userData.role === 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment