<import src="../../module/header.wxml"/>
<template 
    is="header"
    data="{{title:'我要估价',headerheight:headerheight,hasback:true}}"
	/>
<page-scroll 
	className="content"
	styleSheet="height:{{windowh-headerheight}}rpx;"
	scroll-y="{{selectbar==''?'true':'false'}}"
	bind:scrolltolower="{{hasloadall?'':'getMyBuy'}}"
>
	
  	<view
  		class="evaluate_form"
  	>
	  	<view
	  		class="evaluate_form_item"
	  	>
	  		<view class="evaluate_form_it">
	  			<view class="evaluate_form_itw">
	  				*
	  			</view>
	  			卖车地点
	  		</view>
		  	<picker
		  		class="evaluate_form_picker" 
				bindchange="bindRegionChange" 
				value="{{areaselect['0']}}" 
				range="{{area['0']}}"
				range-key="area_name"
				data-index="0"
				bindchange="changeArea"
				custom-item="{{customItem}}">
			    <view class="picker">
			      {{area['0'][areaselect['0']].area_name||'请选择>'}}
			    </view>
		  	</picker>
		  	<picker
		  		class="evaluate_form_picker"
				bindchange="bindRegionChange" 
				value="{{areaselect['1']}}" 
				range="{{area['1']}}"
				range-key="area_name"
				data-index="1"
				bindchange="changeArea"
				custom-item="{{customItem}}">
			    <view class="picker">
			      {{area['1'][areaselect['1']].area_name||'请选择>'}}     
			    </view>
		  	</picker>
  		</view>
	  	<view
	  		class="evaluate_form_item"
	  	>
	  		<view class="evaluate_form_it">
	  			<view class="evaluate_form_itw">
	  				*
	  			</view>
	  			车型
	  		</view>
	  		<view
  				class="evaluate_form_input"
  				bindtap="showSeriesSelect"
  			>
  				<view wx:if="{{model&&model.car_model_name}}" class="series_val">{{model.car_model_name}}</view>
  				<view wx:else class="placeholder_val">请选择</view>
  			</view>
  			<!-- <picker
		  		class="evaluate_form_picker"
				bindchange="bindSeriesChange" 
				value="{{selectseries['0']}}" 
				range="{{series['0']}}"
				range-key="brand_name"
				data-index="0"
				custom-item="{{customItem}}">
			    <view class="picker">
			      {{series['0'][selectseries['0']].brand_name||'请选择>'}}
			    </view>
		  	</picker>
  			<picker
		  		class="evaluate_form_picker"
				bindchange="bindSeriesChange" 
				value="{{selectseries['1']}}" 
				range="{{series['1']}}"
				range-key="car_series_name"
				data-index="1"
				custom-item="{{customItem}}">
			    <view class="picker">
			      {{series['1'][selectseries['1']].car_series_name||'请选择>'}}
			    </view>
		  	</picker>
  			<picker
		  		class="evaluate_form_picker"
				bindchange="bindSeriesChange" 
				value="{{selectseries['2']}}" 
				range="{{series['2']}}"
				range-key="car_model_name"
				data-index="2"
				custom-item="{{customItem}}">
			    <view class="picker">
			      {{series['2'][selectseries['2']].car_model_name||'请选择>'}}
			    </view>
		  	</picker> -->
  		</view>
	  	<view
	  		class="evaluate_form_item"
	  	>
	  		<view class="evaluate_form_it">
	  			<view class="evaluate_form_itw">
	  				*
	  			</view>
	  			上牌时间
	  		</view>
		  	<picker 
		  		class="evaluate_form_picker"
		  		mode="date" 
		  		value="{{date}}" 
		  		start="1998-01-01" 
		  		end="2020-01-01" 
		  		bindchange="bindDateChange">
			    <view class="picker">
			      当前选择: {{date}}
			    </view>
		  	</picker>
  		</view>
	  	<view
	  		class="evaluate_form_item"
	  	>
	  		<view class="evaluate_form_it">
	  			<view class="evaluate_form_itw">
	  				*
	  			</view>
	  			行驶里程
	  		</view>
  			<input
  				class="evaluate_form_input"
  				placeholder="请输入"
  				bindinput="getMileage"
  				placeholder-style="color:#9B9B9B"
  				bindblur="initMileage"
  				value = "{{mileage}}"
  			/>
  			<view class="evaluate_form_itr">万公里</view>
	  	</view>
	  	<view
	  		class="evaluate_form_item"
	  	>
	  		<view class="evaluate_form_it">
	  			<view class="evaluate_form_itw">
	  				*
	  			</view>
	  			接收手机
	  		</view>
  			<input
  				class="evaluate_form_input"
  				placeholder="请输入"
  				bindinput="getMobile"
  				type="number"
  				placeholder-style="color:#9B9B9B"
  			/>
	  	</view>
  	</view>
  	<view 
  		class="sub_evaluate"
  		bindtap="subEvaluate"
  		>开始估价</view> 
<!-- 估价结果 -->
  	<view 
  		class="show_evaluate"
  		style="left:{{showeva?'0rpx':'100%'}}"
  	>
	  	<view 
	  		style="height:{{headerheight}}rpx;"
	  		class="show_evaluate_back">
  			<view class="show_evaluate_ht">你的爱车值这个价</view>
  			<image 
  			bindtap="evaluateBack"
  			src="../../img/back.png"/>
  		</view>
	  	<view class="show_evaluate_tb">
	  		<view class="show_evaluate_t">
	  			{{model.car_model_name}}
	  		</view>
	  		<view class="show_evaluate_dt">
	  			{{datename[0]}}年{{datename[1]}}月上牌|{{mileage}}万公里|{{area['1'][areaselect['1']].area_name}}
	  		</view>
	  	</view>
  		<view class="show_evaluate_sp">
  			<view class="show_evaluate_type">
  				<view 
  					data-index="0"
  					bindtap="swatchEva"
  					class="show_evaluate_tpitem"
  					>
  					<view class="show_evaluate_tpn {{currenteva==0?'active':''}}">
  						车况优秀
  					</view>
  				</view>
  				<view 
  					data-index="1"
  					bindtap="swatchEva"
  					class="show_evaluate_tpitem">
	  				<view class="show_evaluate_tpn {{currenteva==1?'active':''}}">
	  					车况良好
	  				</view>
	  			</view>
  				<view 
  					data-index="2"
  					bindtap="swatchEva"
  					class="show_evaluate_tpitem">
  					<view class="show_evaluate_tpn {{currenteva==2?'active':''}}">
  						车况一般
  					</view>
  				</view>
  			</view>
  			<swiper 
		      class='show_evaluate_info' 
		      duration='300' 
		      bindchange='switchTab'
		      circular='true'
		      current="{{currenteva}}"
		      previous-margin='102rpx'
		      next-margin='102rpx'
		    >
		      <block wx:for="{{detail.eval_prices}}" wx:key="condition">
		        <swiper-item>
		          <view class="show_evaluate_detail">
		          	<view class="show_evaluate_pt">估价范围（万元）</view>
		          	<view class="show_evaluate_pv">{{item.dealer_low_buy_price}}-{{item.dealer_buy_price}}</view>
		          	<view class="show_evaluate_dl">
		          		<view class="show_evaluate_dt">
		          			<view class="show_evaluate_dn">外观</view>
		          			<text class="show_evaluate_dv">{{describe[index].dis}}</text>
		          		</view>
		          		<view class="show_evaluate_dt">
		          			<view class="show_evaluate_dn">内饰</view>
		          			<text class="show_evaluate_dv">{{describe[index].int}}</text>
		          		</view>
		          		<view class="show_evaluate_dt">
		          			<view class="show_evaluate_dn">里程</view>
		          			<text class="show_evaluate_dv">{{describe[index].mil}}</text>
		          		</view>
		          		<view class="show_evaluate_dt">
		          			<view class="show_evaluate_dn">故障维修</view>
		          			<text class="show_evaluate_dv">{{describe[index].maintain}}</text>
		          		</view>
		          	</view>
		          </view>
		        </swiper-item>
		      </block>      
		    </swiper>
  		</view>
  	</view>
</page-scroll>
<brandlist
  show="{{brandlistshow}}"
  getbrand="{{getbrand}}"
  getseries="{{getseries}}"
  bind:close="closeBrandList"
  bind:select="selectModel"
  hasmodel="true"
/>