<!--pages/detail/detail.wxml-->
<!-- <import src='/template/button/button.wxml' /> -->
<wxs src="../../app.wxs" module='app'></wxs>
<!-- <view class="container safe-area-bottom" hidden="{{show}}">
	待遇详情
	<view class="header">
		<view class="info">
			<view class="name global-family">{{name}}</view>
			<view class="money">
				<text>{{price}}元</text>
				<text class="month" wx:if='{{settlementMethod===1 }}'>*{{stage || 0}}期</text>
				<text class="month" wx:if='{{settlementMethod===0 }}'>*1次</text>
			</view>
		</view>
		<view class="bottom">
			<view class="time">
			</view>
			<view class="job-nums">
				<image src="/images/icon/jobs.png"></image>
				<text>任务数：{{number || '若干'}}</text>
			</view>
		</view>
	</view>
	待遇详情结束
	公司地址
	<view class="address" data-name="{{companyName}}" data-address="{{provinceCityCountry}}{{address || ''}}" bindtap="openMap">
		<image src="/images/icon/tower.png"></image>
		<view class="address-info">
			<view class="address-info-text">{{companyName}}</view>
			<view class="point">
				<image src="/images/icon/address_for_detail.png"></image>
				<text>{{provinceCityCountry}}{{address || ''}}</text>
			</view>
		</view>
	</view>
	公司地址结束
	需求详情
	<view class="detail">
		<view class="cell">
			<view class="cell-title">需求描述</view>
			<view class="cell-content">
				<text>{{description}}</text>
			</view>
		</view>
		<view class="cell">
			<view class="cell-title">资质要求</view>
			<view class="cell-content">
				<text>{{qualification}}</text>
			</view>
		</view>
		<view class="cell">
			<view class="cell-title">验收标准</view>
			<view class="cell-content">
				<text>{{acceptanceCriteria}}</text>
			</view>
		</view>
	</view>
	需求详情结束
	<view class="isOn safe-area-bottom" wx:if='{{isOn === 0}}'>
		<text>需求已经下架啦~</text>
	</view>
	底部按钮开始
	<block wx:if='{{status === 1}}'>
		<block wx:if='{{user_id}}'>
			<template is='button-fixed' wx:if="{{displayCancel}}" data='{{text:"取消报名",func:"cancelEnrollment"}}' />
			<template is='button-fixed' wx:if="{{!displayCancel&&needEnrollment}}" data='{{text:"我要报名",func:"showCover"}}' />
			<template is='button-fixed' wx:if="{{!displayCancel&&!needEnrollment}}" data='{{text:"订单已生成",background:"linear-gradient(135deg,#ECF0F3 0%,#E4E2E7 100%)"}}' />
		</block>
		<block wx:else>
			<template is='button-fixed' data='{{text:"我要报名",func:"showCover"}}' />
		</block>
	</block>
	如果合同存在则显示查看合同 没有则显示不显示该字段
	<template is='button-check' wx:if='{{status === 2}}' data='{{text:"查看合同",btn:message[hwOrderAPI.status],background:hwOrderAPI.status === 0?"":"linear-gradient(135deg,#ECF0F3 0%,#E4E2E7 100%)",buttonRight:hwOrderAPI.status === 0?"":"buttonRight",display:hwOrderAPI.workContract?"":"none"}}' />
	底部按钮结束
</view>

<view class="cover" hidden="{{cover}}">

	<view class="model" hidden="{{!hasInfo}}">
		<view class="cancel-icon">
			<image src="/images/icon/cancel.png" class="cancel-img" bindtap="cover"></image>
		</view>
		<view class="model-title">
			我的亮点
		</view>
		<view class="textarea">
			<textarea placeholder="填写亮点更容易获得发布者的青睐，该项为选填项。" placeholder-style="color:#888A8E;" bindinput="input"></textarea>
		</view>
		<view class="model-action">
			<view class="cancel" bindtap="cover">
				取消
			</view>
			<view class="confirm" bindtap="apply">
				确认报名
			</view>
		</view>
	</view>
	<view class="supplement-info" hidden="{{hasInfo}}">
		<image src="/images/icon/cancel.png" class="supplement-cancel-icon" bindtap="cover"></image>
		<view class="supplement-header">
			<text class="supplement-header-title global-family">提示</text>
			<text class="supplement-header-content">为了保障真实性以便于发包方联系您，您需要完善个人信息。</text>
		</view>
		<view class="supplement-input {{!name_error||'border'}}">
			<view class="labal">姓名：</view>
			<input placeholder="请输入姓名" placeholder-class="placeholder" class="input" bindblur="saveName"></input>
		</view>
		<view class="error">
			<text hidden="{{!name_error}}">{{name_error}}</text>
		</view>
		<view class="supplement-input {{!id_error||'border'}}">
			<view class="labal">身份证号：</view>
			<input placeholder="请输入身份证号" placeholder-class="placeholder" class="input" bindblur="saveIdCardNumber"></input>
		</view>
		<view class="error">
			<text hidden="{{!id_error}}">{{id_error}}</text>
		</view>
		<view class="supplement-input-textarea">
			<view class="labal">我的亮点：</view>
			<textarea placeholder="填写亮点更容易获得发布者的青睐，该项为选填项。" placeholder-class="placeholder" class="input" bindinput="input"></textarea>
		</view>
		<view class="supplement-action">
			<view class="cancel" bindtap="cover">
				取消
			</view>
			<view class="confirm" bindtap="apply">
				确认报名
			</view>
		</view>
	</view>
</view> -->

<view class="container safe-area-bottom">
	<view class="header">
		<view class="header-info">
			<view class="name">{{name}}</view>
			<view class="price">{{price}}元</view>
		</view>
		<view class="header-detail">
			<view class="address">
				<image src="../../imgs/number.png" class="address-image"></image>
				<text>报名数：{{number || '若干'}}</text>
			</view>
			<view class="time">
				<image src="../../imgs/time.png" class="time-image"></image>
				<text>{{app.formatTime(requirementTime,'.','',true)}}</text>
			</view>
		</view>
	</view>

	<view class="company" data-name="{{companyName}}" data-address="{{provinceCityCountry}}{{address || ''}}"
		bindtap="openMap">
		<image src="../../imgs/company.png" class="company-logo"></image>
		<view class="company-info">
			<view class="company-name">{{companyName}}</view>
			<view class="company-position">{{provinceCityCountry}}{{address || ''}}</view>
		</view>
	</view>

	<view class="content">
		<view class="content-item" wx:if="{{description}}">
			<view class="content-item-name">需求描述</view>
			<view class="content-item-text">
				<text>{{description}}</text>
			</view>
		</view>
		<view class="content-item" wx:if="{{qualification}}">
			<view class="content-item-name">资质要求</view>
			<view class="content-item-text">
				<text>{{qualification}}</text>
			</view>
		</view>

		<view class="content-item" wx:if="{{acceptanceCriteria}}">
			<view class="content-item-name">验收标准</view>
			<view class="content-item-text">
				<text>{{acceptanceCriteria}}</text>
			</view>
		</view>
	</view>
	<view class="button safe-area-bottom">
		<block wx:if="{{status === 1}}">
			<view class="button-content" bindtap="apply" wx:if="{{detail_status === 0}}">我要报名</view>
			<view class="button-content disabled" wx:if="{{detail_status === 5}}">企业确认中</view>
		</block>
		<block wx:if="{{status===2}}">
			<view class="button-content" bindtap="buttonSubmit" wx:if="{{hwOrderAPI.status === 0}}">确认签署</view>
			<view class="button-content disabled" wx:if="{{hwOrderAPI.status === 2}}">订单进行中</view>
			<view class="button-content disabled" wx:if="{{hwOrderAPI.status === 1}}">订单已完成</view>
		</block>
	</view>
</view>