<!--pages/userInfo/userInfo.wxml-->
<view class="pageWrap">
	<view class="area shadow">
		<view bindtap="uploadAvatar" class="logo">
			<view class="label">头像</view>
			<view class="content">
				<image class="avatar" wx:if="{{!user.avatar}}" src="../../images/default-avatar.png"></image>
				<image class="avatar" wx:if="{{user.avatar}}" src="{{globalUrl+user.avatar}}"></image>
				<i class="iconfont icon-arrowr"></i>
			</view>
		</view>
		<view bindtap="showNickName" class="lineGroup">
			<view class="lineInner">
				<view class="label">昵称</view>
				<view class="content">
					<view wx:if="{{user.nickName}}" class="text">{{user.nickName}}</view>
					<view wx:if="{{!user.nickName}}" class="placeholderStyle">请输入</view>
				</view>
			</view>
		</view>
		<view class="lineGroup">
			<view class="lineInner">
				<view class="label">姓名</view>
				<view class="content">
					<view class="text">{{userInfo.userName}}</view>
				</view>
			</view>
		</view>
		<picker bindchange="setSex" value="{{sexIndex}}" range="{{sex}}" class="lineGroup">
			<view class="lineInner">
				<view class="label">性别</view>
				<view class="content">
					<view wx:if="{{user.sex}}" class="text">{{sex[sexIndex]}}</view>
					<view wx:if="{{!user.sex}}" class="placeholderStyle">请选择</view>
				</view>
			</view>
		</picker>
		<view class="lineGroup">
			<view class="lineInner">
				<view class="label">手机号码</view>
				<view class="content">
					<view class="text">{{userInfo.mobile}}</view>
				</view>
			</view>
		</view>
		<!--
		<view bindtap="showIntro" class="lineGroup">
			<view class="lineInner">
				<view class="label">个人简介</view>
				<view class="content">
					<view wx:if="{{user.personalProfile}}" class="text textarea">{{user.personalProfile}}</view>
					<view wx:if="{{!user.personalProfile}}" class="placeholderStyle textarea">请输入</view>
				</view>
			</view>
		</view>
    -->
	</view>
	<view wx:if="{{userInfo.roles===1}}" class="area shadow">
		<view class="lineGroup">
			<view class="lineInner">
				<view class="label">公司名称</view>
				<view class="content">
					<view wx:if="{{companyDefault.entName}}" class="text">{{companyDefault.entName}}</view>
					<view wx:if="{{!companyDefault.entName}}" class="placeholderStyle">请输入</view>
				</view>
			</view>
		</view>

		<view class="lineGroup">
			<view class="lineInner">
				<view class="label">税号</view>
				<view class="content">
					<view wx:if="{{companyDefault.entTaxId}}" class="text">{{companyDefault.entTaxId}}</view>
					<view wx:if="{{!companyDefault.entTaxId}}" class="placeholderStyle">请输入</view>
				</view>
			</view>
		</view>
		<picker bindchange="setEntType" value="{{entTypeDictIndex}}" range="{{entTypeDict}}" class="lineGroup">
			<view class="lineInner">
				<view class="label">企业类型</view>
				<view class="content">
					<view wx:if="{{companyDefault.entType}}" class="text">{{entTypeDict[entTypeDictIndex]}}</view>
					<view wx:if="{{!companyDefault.entType}}" class="placeholderStyle">请选择</view>
				</view>
			</view>
		</picker>
		<view bindtap="showEntShortName" class="lineGroup">
			<view class="lineInner">
				<view class="label">企业简称</view>
				<view class="content">
					<view wx:if="{{companyDefault.entShortName}}" class="text ">{{companyDefault.entShortName}}</view>
					<view wx:if="{{!companyDefault.entShortName}}" class="placeholderStyle textarea">请输入</view>
				</view>
			</view>
		</view>
		<view bindtap="showAvailableTaxes" class="lineGroup">
			<view class="lineInner">
				<view class="label">可用税率</view>
				<view class="content">
					<view wx:if="{{companyDefault.availableTaxes}}" class="text ">{{companyDefault.availableTaxes}}</view>
					<view wx:if="{{!companyDefault.availableTaxes}}" class="placeholderStyle textarea">请输入</view>
				</view>
			</view>
		</view>
		<picker bindchange="setDefaultInvoiceDevice" value="{{deviceTypeDictIndex}}" range="{{deviceTypeDict}}" class="lineGroup">
			<view class="lineInner">
				<view class="label">默认开票设备</view>
				<view class="content">
					<view wx:if="{{companyDefault.defaultInvoiceDevice}}" class="text">{{deviceTypeDict[deviceTypeDictIndex]}}</view>
					<view wx:if="{{!companyDefault.defaultInvoiceDevice}}" class="placeholderStyle">请选择</view>
				</view>
			</view>
		</picker>
		<block wx:if="{{spreadFlag}}">
			<view bindtap="showPayees" class="lineGroup">
				<view class="lineInner">
					<view class="label">收款人</view>
					<view class="content">
						<view wx:if="{{companyDefault.payees}}" class="text ">{{companyDefault.payees}}</view>
						<view wx:if="{{!companyDefault.payees}}" class="placeholderStyle textarea">请输入</view>
					</view>
				</view>
			</view>
			<view bindtap="showReviewers" class="lineGroup">
				<view class="lineInner">
					<view class="label">审核人</view>
					<view class="content">
						<view wx:if="{{companyDefault.reviewers}}" class="text ">{{companyDefault.reviewers}}</view>
						<view wx:if="{{!companyDefault.reviewers}}" class="placeholderStyle textarea">请输入</view>
					</view>
				</view>
			</view>
			<view bindtap="showBankName" class="lineGroup">
				<view class="lineInner">
					<view class="label">开户行</view>
					<view class="content">
						<view wx:if="{{companyDefault.bankName}}" class="text">{{companyDefault.bankName}}</view>
						<view wx:if="{{!companyDefault.bankName}}" class="placeholderStyle">请输入</view>
					</view>
				</view>
			</view>
			<view bindtap="showBankAccountNumber" class="lineGroup">
				<view class="lineInner">
					<view class="label">银行账号</view>
					<view class="content">
						<view wx:if="{{companyDefault.bankAccountNumber}}" class="text">{{companyDefault.bankAccountNumber}}</view>
						<view wx:if="{{!companyDefault.bankAccountNumber}}" class="placeholderStyle">请输入</view>
					</view>
				</view>
			</view>
			<view bindtap="showEntContactPerson" class="lineGroup">
				<view class="lineInner">
					<view class="label">联系人</view>
					<view class="content">
						<view wx:if="{{companyDefault.entContactPerson}}" class="text ">{{companyDefault.entContactPerson}}</view>
						<view wx:if="{{!companyDefault.entContactPerson}}" class="placeholderStyle textarea">请输入</view>
					</view>
				</view>
			</view>
			<view bindtap="showEntPhone" class="lineGroup">
				<view class="lineInner">
					<view class="label">企业电话</view>
					<view class="content">
						<view wx:if="{{companyDefault.entPhone}}" class="text ">{{companyDefault.entPhone}}</view>
						<view wx:if="{{!companyDefault.entPhone}}" class="placeholderStyle textarea">请输入</view>
					</view>
				</view>
			</view>
			<view bindtap="showEntAddress" class="lineGroup">
				<view class="lineInner">
					<view class="label">公司地址</view>
					<view class="content">
						<view wx:if="{{companyDefault.entAddress}}" class="text textarea">{{companyDefault.entAddress}}</view>
						<view wx:if="{{!companyDefault.entAddress}}" class="placeholderStyle textarea">请输入</view>
					</view>
				</view>
			</view>
		</block>
		<view class="lineSpread">
			<button bindtap="spreadBuyer" class="btn">{{spreadFlag?'收起更多填写项':'展开更多填写项'}}</button>
		</view>
	</view>
</view>
<customer-modal id="nickName" title="昵称" bindconfirm="getNickName"></customer-modal>
<customer-modal id="intro" title="个人简介" bindconfirm="getIntro"></customer-modal>
<customer-modal id="entShortName" title="企业简称" bindconfirm="getEntShortName"></customer-modal>
<customer-modal id="availableTaxes" title="可用税率(英文逗号分割)" bindconfirm="getAvailableTaxes"></customer-modal>
<customer-modal id="payees" title="收款人(英文逗号分割)" bindconfirm="getPayees"></customer-modal>
<customer-modal id="reviewers" title="审核人(英文逗号分割)" bindconfirm="getReviewers"></customer-modal>
<customer-modal id="bankName" title="开户行" bindconfirm="getbankName"></customer-modal>
<customer-modal id="bankAccountNumber" title="银行账号" bindconfirm="getBankAccountNumber"></customer-modal>
<customer-modal id="entContactPerson" title="联系人" bindconfirm="getEntContactPerson"></customer-modal>
<customer-modal id="entPhone" title="企业电话" bindconfirm="getEntPhone"></customer-modal>
<customer-modal id="entAddress" title="公司地址" bindconfirm="getEntAddress"></customer-modal>