<mp-toptips msg="{{errorToptips}}" delay="3000" type="error" show="{{errorToptips}}"></mp-toptips>
<answer id='answer'></answer>
<view class="two-wrap">
	<view class="flex-xm4">
		<view class="tname">用户姓名</view>
		<input type="text" class="weight" placeholder="必填" value="{{name}}" bindinput='bindName' maxlength="30"></input>
	</view>
	<view class="flex-xm4">
		<view class="tname">手机号</view>
		<view class="phoneinput">
			<input type="number" placeholder="选填" value="{{phone}}" bindinput='bindPhone' maxlength="11"></input>
			<view wx:if="{{!phoneYes}}" class="line"></view>
			<button wx:if='{{!phoneYes}}' class="wxhq" open-type="getPhoneNumber"
				bindgetphonenumber="getPhoneNumber">微信获取</button>
			<button wx:if="{{time==0&&phoneYes}}" class="getcode" bindtap="getPhoneCode">获取验证码</button>
			<view wx:if="{{time!=0&&phoneYes}}" class="vcode">{{time}}s</view>
		</view>
	</view>
	<view class="flex-xm4" wx:if="{{phoneYes}}">
		<view class="tname">验证码</view>
		<input type="number" class="weight" placeholder="输入验证码" value="{{code}}" bindinput='bindCode' maxlength="4"></input>
	</view>
	<view class="flex-xm4" wx:if='{{noIdCard==0}}'>
		<view class="tname">证件类型</view>
		<picker bindchange="bindIdType" value="{{idType}}" range="{{idTypeArr}}">
			<view class="picker">
				{{idTypeArr[idType]}}
				<text class="cuIcon-right"></text>
			</view>
		</picker>
	</view>
	<view class="flex-xm4" wx:if='{{noIdCard==0}}'>
		<view class="tname" wx:if="{{idType==0}}">身份证号</view>
		<view class="tname" wx:if="{{idType==1}}">证件号码</view>
		<input type="idcard" class="weight" placeholder="{{needIdCard=='1'?'必填':'选填'}}" value="{{idCard}}"
			bindinput='bindIdCard' maxlength="18"></input>
	</view>
	<view class="flex-xm4" wx:if='{{lock&&noIdCard==0}}'>
		<view class="tname" style="color: #888;">性别</view>
		<view class="weight" style="color: #888;">
			<view class="selectBtn {{SEXstate==0?'active':''}}" data-type="man" data-state="0">男</view>
			<view class="selectBtn {{SEXstate==1?'active':''}}" data-type="woman" data-state="1">女</view>
		</view>
	</view>
	<view class="flex-xm4" wx:else>
		<view class="tname">性别</view>
		<view class="weight">
			<view class="selectBtn {{SEXstate==0?'active':''}}" bindtap='selectBtn' data-type="man" data-state="0">男</view>
			<view class="selectBtn {{SEXstate==1?'active':''}}" bindtap='selectBtn' data-type="woman" data-state="1">女</view>
		</view>
	</view>
	<view class="flex-xm4" wx:if='{{lock&&noIdCard==0}}'>
		<view class="tname" style="color: #888;"><text class="red" wx:if="{{needIdCard=='1'}}"></text>出生年月</view>
		<picker disabled='true' mode="date" value="{{date}}" start="1900-01-01" end="{{endTime}}"
			bindchange="bindDateChange">
			<view class="picker {{date=='请选择'?'activ':'pic'}}" style="color: #888;">
				{{date}}
			</view>
		</picker>
	</view>
	<view class="flex-xm4" wx:else>
		<view class="tname"><text class="red" wx:if="{{needIdCard=='1'}}"></text>出生年月</view>
		<picker mode="date" value="{{date}}" start="1900-01-01" end="{{endTime}}" bindchange="bindDateChange">
			<view class="picker {{date=='请选择'?'activ':'pic'}}">
				{{date}}
			</view>
		</picker>
	</view>
	<view class="flex-xm4">
		<view class="tname">体重(kg)</view>
		<input type="digit" class="weight" placeholder="选填" value="{{weight}}" bindinput='bindWeight' maxlength="6"></input>
	</view>
	<view class="flex-xm4 {{GMSstate==0?'':'noborder'}}">
		<view class="tname">过敏史</view>
		<view class="weight">
			<view class="selectBtn {{GMSstate==0?'active':''}}" bindtap='selectBtn' data-type="GMS" data-state="0">无</view>
			<view class="selectBtn {{GMSstate==1?'active':''}}" bindtap='selectBtn' data-type="GMS" data-state="1">有</view>
		</view>
	</view>
	<view class="flex-xm5" wx:if='{{ GMSstate==1}}'>
		<textarea bindinput="bindGMS" placeholder="请填写过敏药物（非常重要）" value="{{GMStext}}" maxlength="20"></textarea>
		<view class="number">{{GMSLength}}/20</view>
	</view>
	<view class="flex-xm4 {{GWBSstate==0?'':'noborder'}}">
		<view class="tname">过往病史</view>
		<view class="weight">
			<view class="selectBtn {{GWBSstate==0?'active':''}}" bindtap='selectBtn' data-type="GWBS" data-state="0">无</view>
			<view class="selectBtn {{GWBSstate==1?'active':''}}" bindtap='selectBtn' data-type="GWBS" data-state="1">有</view>
		</view>
	</view>
	<view class="flex-xm5" wx:if='{{ GWBSstate==1}}'>
		<textarea bindinput="bindGWBS" placeholder="请填写肝肾功能状况及过往病史" value="{{GWBStext}}" maxlength="100"></textarea>
		<view class="number">{{GWBSLength}}/100</view>
	</view>
	<view class="flex-xm4">
		<view class="tname">肝功能</view>
		<view class="weight">
			<view class="selectBtn {{GGNstate==0?'active':''}}" bindtap='selectBtn' data-type="GGN" data-state="0">正常</view>
			<view class="selectBtn {{GGNstate==1?'active':''}}" bindtap='selectBtn' data-type="GGN" data-state="1">异常</view>
		</view>
	</view>
	<view class="flex-xm4">
		<view class="tname">肾功能</view>
		<view class="weight">
			<view class="selectBtn  {{SGNstate==0?'active':''}}" bindtap="selectBtn" data-type="SGN" data-state="0">正常</view>
			<view class="selectBtn {{SGNstate==1?'active':''}}" bindtap='selectBtn' data-type="SGN" data-state="1">异常</view>
		</view>
	</view>
	<view class="flex-xm4" wx:if="{{SEXstate==1}}">
		<view class="tname">备孕情况</view>
		<view class="weight">
			<view class="selectBtn  {{BYQKstate==0?'active':''}}" bindtap='selectBtn' data-type="BYQK" data-state="0">无</view>
			<!-- <view class="selectBtn {{BYQKstate==1?'active':''}}" bindtap='selectBtn' data-type="BYQK" data-state="1">备孕中</view> -->
			<view class="selectBtn {{BYQKstate==2?'active':''}}" bindtap='selectBtn' data-type="BYQK" data-state="2">怀孕中
			</view>
			<view class="selectBtn {{BYQKstate==3?'active':''}}" bindtap='selectBtn' data-type="BYQK" data-state="3">哺乳中
			</view>
		</view>
	</view>
</view>
<view class="btn">
	<view bindtap="sava" wx:if='{{needIdCard=="1"&&sava}}'>保存并使用</view>
	<view wx:if='{{needIdCard=="1"&&!sava}}' style="background:#666;">保存并使用</view>
	<view bindtap="sava" wx:if='{{needIdCard=="0"}}'>完成</view>
	<view bindtap="del" wx:if='{{id&&nodel==0}}' class="del">删除</view>
</view>