<!--pages/goodsAdd/goodsAdd.wxml-->
<view class="formArea">
	<view class="lineGroup">
		<view class="lineInner">
			<view class="label middle">
				<text class="star">*</text><text>产品名称</text>
			</view>
			<view class="content">
				<input bindinput="getName" value="{{params.productName}}" class="input " type="text" placeholder="请输入产品名称" placeholder-class="placeholderStyle"></input>
			</view>
		</view>
	</view>
	<view class="lineGroup">
		<view class="lineInner">
			<view class="label middle">
				<text class="star">*</text><text>税收分类编码</text>
			</view>
			<view class="content">
				<view class="diyInput left nopadding">
					<text wx:if="{{params.taxationCateName}}">{{params.taxationCateCode}}</text>
					<text wx:if="{{params.taxationCateName===''}}" class="placeholderStyle">请选择税收分类编码</text>
				</view>
			</view>
			<button bindtap="search" class="searchBtn">查询</button>
		</view>
	</view>
	<!--
	<view class="lineGroup">
		<view class="lineInner">
			<view class="label middle">简码</view>
			<view class="content">
				<input bindinput="getCode" value="{{params.shortCode}}" class="input " type="text" placeholder="请输入简码" placeholder-class="placeholderStyle"></input>
			</view>
		</view>
	</view>
  -->
	<view class="lineGroup">
		<view class="lineInner">
			<view class="label middle">规格</view>
			<view class="content">
				<input bindinput="getSpecs" value="{{params.specsModel}}" class="input " type="text" placeholder="请输入规格" placeholder-class="placeholderStyle"></input>
			</view>
		</view>
	</view>
	<view class="lineGroup">
		<view class="lineInner">
			<view class="label middle">计量单位</view>
			<view class="content">
				<input bindinput="getUnit" value="{{params.unit}}" class="input " type="text" placeholder="请输入" placeholder-class="placeholderStyle"></input>
			</view>
		</view>
	</view>
	<view class="lineGroup">
		<view class="lineInner">
			<view class="label middle">单价</view>
			<view class="content">
				<input bindinput="getPrice" value="{{params.price}}" class="input" type="digit" placeholder="请输入" placeholder-class="placeholderStyle"></input>
			</view>
		</view>
	</view>
</view>
<view class="formArea">
	<!-- 税率 -->
	<picker wx:if="{{othersRate===''}}" bindchange="setTaxRate" disabled="{{taxRateDisabled}}" value="{{taxRateIndex}}" range="{{taxRate}}" class="lineGroup">
		<view class="lineInner">
			<view class="label middle">税率</view>
			<view class="content">
				<view class="diyInput hasArrow">
					<view wx:if="{{taxRateIndex!==''}}">{{taxRate[taxRateIndex]}}%</view>
					<view wx:if="{{taxRateIndex===''}}" class="placeholderStyle">请选择</view>
				</view>
				<i class="iconfont icon-arrowr arrow"></i>
			</view>
		</view>
	</picker>
	<view wx:if="{{othersRate!==''}}" class="lineGroup {{taxRateDisabled?'disabled':''}}">
		<view class="lineInner">
			<view class="label middle">税率</view>
			<view class="content">
				<view class="diyInput hasArrow">{{othersRate*100}}%</view>
				<i class="iconfont icon-arrowr arrow"></i>
			</view>
		</view>
	</view>
	<!-- 零税率标识 -->
	<picker bindchange="setZeroRateFlag" value="{{zeroRateFlagIndex}}" range="{{zeroRateFlag}}" class="lineGroup">
		<view class="lineInner">
			<view class="label middle">零税率标识</view>
			<view class="content">
				<view class="diyInput hasArrow">
					<view wx:if="{{zeroRateFlagIndex!==''}}">{{zeroRateFlag[zeroRateFlagIndex]}}</view>
					<view wx:if="{{zeroRateFlagIndex===''}}" class="placeholderStyle">请选择</view>
				</view>
				<i class="iconfont icon-arrowr arrow"></i>
			</view>
		</view>
	</picker>
	<!-- 是否使用优惠政策 -->
	<picker bindchange="setPreferentialFlag" value="{{preferentialFlagIndex}}" range="{{preferentialFlag}}" class="lineGroup">
		<view class="lineInner">
			<view class="label large">是否使用优惠政策</view>
			<view class="content">
				<view class="diyInput hasArrow">
					<view wx:if="{{preferentialFlagIndex!==''}}">{{preferentialFlag[preferentialFlagIndex]}}</view>
					<view wx:if="{{preferentialFlagIndex===''}}" class="placeholderStyle">请选择</view>
				</view>
				<i class="iconfont icon-arrowr arrow"></i>
			</view>
		</view>
	</picker>
	<!-- 优惠政策类型 -->
	<picker wx:if="{{preferentialFlagIndex===1}}" bindchange="setPreferentialType" value="{{preferentialTypeIndex}}" range="{{preferentialType}}" range-key="label" class="lineGroup">
		<view class="lineInner">
			<view class="label large">优惠政策类型</view>
			<view class="content">
				<view class="diyInput hasArrow">
					<view wx:if="{{preferentialTypeIndex!==''}}">{{preferentialType[preferentialTypeIndex].label}}</view>
					<view wx:if="{{preferentialTypeIndex===''}}" class="placeholderStyle">请选择</view>
				</view>
				<i class="iconfont icon-arrowr arrow"></i>
			</view>
		</view>
	</picker>
</view>
<view class="bottomPlaceholder"></view>
<ipx-placeholder></ipx-placeholder>
<customer-bottom>
	<view class="btnGroup">
		<button bindtap="back" class="btn cancel">取消</button>
		<button bindtap="submitData" class="btn save">保存</button>
	</view>
</customer-bottom>