<view class="head" hover-class="navigator-hover" bindtap="openFiltrate">
	<view class="filter">
		<text class="iconfont icon-shaixuan" />
		{{language[username]||username}}_{{language[content.where.isleave==1?'在职':content.where.isleave?'离职':'全部']||content.where.isleave==1?'在职':content.where.isleave?'离职':'全部'}}
	</view>
	<view class="filter">
		<text class="iconfont icon-lingyu" />
		{{language[content.where.tradefield||'领域']||content.where.tradefield||'领域'}}
	</view>
</view>
<Yl_ListBox id='ListBox' pullDown='{{false}}' bind:getlist='getList'>
	<view class="analysis" style="padding: 0;margin:0;">
		<timeRange id='TimeRange' grading='date' dateTypes='{{dateTypes}}' dateType='{{content.dateType}}' bind:onChange='changeDate' />
		<view style="padding-left: 40rpx;">
			<checkbox-group bindchange="onCheckboxChange" style="display: flex; align-items: center;">
				<label style="font-size: 12px; display: flex; align-items: center;">
					<checkbox value="{{chartDataUnfinish}}" style="transform: scale(0.7);" color="#296DEF" />
					{{language['包含失败、结案项目']||'包含失败、结案项目'}}
				</label>
			</checkbox-group>
		</view>
	</view>
	<view class="funnel">
		<ec-canvas id="funnel" canvas-id="funnel" ec="{{ ec }}"></ec-canvas>
	</view>
	<view class="analysis" style="margin-top: 0;" wx:if="{{isHY}}">
		<view class="title">{{language['项目预计成交统计']||'项目预计成交统计'}}</view>
		<view class="title1" style="margin-top: 20rpx;">
			{{language['前12个月成交项目指标']||'前12个月成交项目指标'}}
		</view>
		<view class="box">
			<view class="row">
				<view class="label">{{language['成交项目数']||'成交项目数'}}：</view>
				<view class="value">{{firstTwelveMonths.dealTotalCount}}</view>
			</view>
			<view class="row">
				<view class="label">{{language['失败项目数']||'失败项目数'}}：</view>
				<view class="value">{{firstTwelveMonths.failTotalCount}}</view>
			</view>
			<view class="row">
				<view class="label">{{language['项目成交率']||'项目成交率'}}：</view>
				<view class="value">{{firstTwelveMonths.dealRate}}</view>
			</view>
		</view>
		<view class="box">
			<view class="row">
				<view class="label">{{language['预计成交正偏差']||'预计成交正偏差'}}：</view>
				<view class="value"><text class="count">{{firstTwelveMonths.positiveCount}}{{language['个']||'个'}}</text>{{firstTwelveMonths.positiveOffsetAmount}}{{language['万']||'万'}}</view>
			</view>
			<view class="row">
				<view class="label">{{language['预计成交负偏差']||'预计成交负偏差'}}：</view>
				<view class="value"><text class="count">{{firstTwelveMonths.negativeCount}}{{language['个']||'个'}}</text>{{firstTwelveMonths.negativeOffsetAmount}}{{language['万']||'万'}}</view>
			</view>
			<view class="row">
				<view class="label">{{language['预计成交准确率']||'预计成交准确率'}}：</view>
				<view class="value">{{firstTwelveMonths.rightRate}}</view>
			</view>
		</view>
		<view class="box">
			<view class="row">
				<view class="label">{{language['项目成交金额合计']||'项目成交金额合计'}}：</view>
				<view class="value">{{firstTwelveMonths.dealAmount}}{{language['万']||'万'}}</view>
			</view>
			<view class="row">
				<view class="label">{{language['预计签约金额合计']||'预计签约金额合计'}}：</view>
				<view class="value">{{firstTwelveMonths.signAmount}}{{language['万']||'万'}}</view>
			</view>
		</view>
		<view style="height: 20rpx;" />
	</view>
	<view class="analysis" wx:if="{{isHY}}">
		<block>
			<view class="title1">
				{{language['未来12月预计签约金额/预计成交金额分析']||'未来12月预计签约金额/预计成交金额分析'}}({{language['单位']||'单位'}}:{{language['万']||'万'}})
			</view>
		</block>
	</view>
	<view class="analysis" style="padding: 0;margin:0;" wx:if="{{isHY}}">
		<filtrate id='Filtrate' iconName='icon-xiangmujieduan' list='{{[]}}' title='项目阶段' bind:clickOpen='openProjectPhases' />
		<view style="padding-left: 40rpx;">

			<checkbox-group bindchange="onCheckboxChange1" style="display: flex; align-items: center;">
				<label style="font-size: 12px; display: flex; align-items: center;">
					<checkbox value="{{ComingYearUnfinish}}" style="transform: scale(0.7);" color="#296DEF" />
					{{language['包含失败、结案项目']||'包含失败、结案项目'}}
				</label>
			</checkbox-group>
		</view>
		<view class="barGraph">
			<ec-canvas id="barGraph" canvas-id="barGraph" ec="{{ ec }}"></ec-canvas>
		</view>
	</view>

	<block wx:if="{{!isHY}}">
		<view class="item">
			<view class="label">{{language[statistics[showIndex].stagename]||statistics[showIndex].stagename}}</view>
			<view class="row">
				<view>{{language['项目总数']||'项目总数'}}：{{statistics[showIndex].sequence1}}</view>
				<view>{{language['当前项目数']||'当前项目数'}}：{{statistics[showIndex].projectqty}}</view>
			</view>
			<view class="row">
				<view>
					{{language['预计签约金额']||'预计签约金额'}}：{{statistics[showIndex].signamount_due}}{{language['万元']||'万元'}}
				</view>
				<view>
					{{language['项目成交金额']||'项目成交金额'}}：{{statistics[showIndex].dealamount}}{{language['万元']||'万元'}}
				</view>
			</view>
		</view>
	</block>

	<view class="hy-project">
		<block wx:if="{{isHY}}">
			<view class="top-title">
				{{ pageMsg.signdate_due
			?pageMsg.signdate_due+(language['月']||'月'):'全部'}}_{{language['预计成交项目']||'预计成交项目'}}({{list[0].sa_projectid?pageMsg.total:0}})
			</view>
			<view class="amount-row">
				<view>
					{{language['预计签约金额']||'预计签约金额'}}：{{pageMsg.sumsignamount_due }}{{language['万元']||'万元'}}
				</view>
				<view>
					{{language['预计成交金额']||'预计成交金额'}}：{{pageMsg.sumdealamount_due }}{{language['万元']||'万元'}}
				</view>
			</view>
		</block>
		<block wx:if="{{list[0].sa_projectid}}">
			<navigator url="/packageA/project/detail?id={{item.sa_projectid}}" class="project-item" wx:for="{{list}}" wx:key="sa_projectid">
				<view class="chart">
					<view class="circle">
						<view class="circle_left ab" style="{{render.leftRate(item.progress)}}" />
						<view class="circle_right ab" style="{{render.rightRate(item.progress)}}" />
						<view class="circle_text">
							<text class="value">{{item.stage+'/'+item.totalstage}}</text>
							<text class="name">{{language['进展']||'阶段进度'}}</text>
						</view>
					</view>
				</view>
				<view class="main">
					<view class="label">
						<view class="title line-1">{{item.projectname}}</view>
						<view class="state" style="background-color: {{item.status == '跟进中' ? '#3874f6' : sColors[item.status]}};">
							{{language[item.status]||item.status}}
						</view>
					</view>
					<view class="tag-box">
						<view class="systemtag" wx:for="{{item.tag_sys}}" style="background-color: {{sColors[item]}};" wx:key="item">
							{{language[item]||item}}
						</view>
						<view class="datatag" wx:for="{{item.tag}}" style="background-color: {{sColors[item]}};" wx:key="item">
							{{language[item]||item}}
						</view>
					</view>
					<view class="replenish">
						<text style="color: #999;">{{language['项目编号']||'项目编号'}}：</text>
						<text>{{item.projectnum}}</text>
					</view>
					<view class="replenish">
						<text style="color: #666; flex-shrink: 0;">{{language['项目地址']||'项目地址'}}：</text><text style="width: 380rpx;">{{item.province?item.province+item.city+item.county+item.address:'--'}}</text>
					</view>
					<view class="replenish">
						<text style="color: #999;">{{language['预计签约金额']||'预计签约金额'}}：</text>
						<text style="color: #3874F6;">{{item.signamount_due}}</text>
					</view>
					<view class="replenish"><text style="color: #999;">{{language['项目成交金额']||'项目成交金额'}}：</text><text style="color: #FF3B30;">{{item.dealamount}}</text></view>
					<view class="replenish"><text style="color: #999;">{{language['项目类型']||'项目类型'}}：</text><text>{{language[item.projecttype_remarks]||item.projecttype_remarks}}</text>
					</view>
					<view class="replenish"><text style="color: #999;">{{language['负责人']||'负责人'}}：</text><text>{{item.reportby||'--'}}</text>
					</view>
				</view>
			</navigator>
		</block>
	</view>
	<My_empty wx:if="{{!list[0].sa_projectid}}"></My_empty>
	<wxs module="render">
		module.exports = {
			rightRate: function (rate) {
				if (rate - 0 < 50) {
					return 'transform: rotate(' + 3.6 * (rate - 0) + 'deg);';
				} else {
					return 'transform: rotate(0);border-color: var(--assist);';
				}
			},
			leftRate: function (rate) {
				if (rate - 0 >= 50) {
					return 'transform: rotate(' + 3.6 * (rate - 50) + 'deg);';
				}
			}
		}
	</wxs>

</Yl_ListBox>
<Yl_Filtrate1 id="Yl_Filtrate1" show='{{showFiltrate}}' list="{{filtratelist}}" bindhandle="handleFilter">
	<organization slot='head' defaultIsleave='1' dimissionF id='organization' />
</Yl_Filtrate1>
<Yl_Filtrate1 show='{{projectPhasesShow}}' isReset='{{false}}' list="{{projectPhases}}" bindinterrupt='phasesInterrupt' bindhandle="phasesHandleFilter" />