<style>
	.title-lable{width: 90px;color: #6c757d;padding-right: 10px;text-align: justify;text-align-last: justify;}
	.text-justify{text-align: justify;text-align-last: justify;}
	.el-tabs__nav-next, .el-tabs__nav-prev{line-height: 60px;}
	.business-dialog .el-dialog__header{padding: 1rem;border-bottom: solid 1px #DDDDDD;}
	.business-dialog .el-dialog__header .el-dialog__title{font-size: 16px;}
	.business-dialog .el-dialog__header .el-dialog__headerbtn{top: 16px;}
	.business-dialog .el-dialog__body{padding: 1rem;color: #333333;}
	.btn-F5F7FB{background-color: #F5F7FB;color: #888888;border-radius: 6px; padding: 10px 0;cursor: pointer;}
	.btn-F5F7FB:hover{background-color: #f1f5ff;}
	.btn-F5F7FB span{font-size: 12px;padding-left: 6px;}
	.business-table td:hover{background-color: #F8F8F8;cursor: pointer;}
</style>
<div id="Business" class="business">
	<el-dialog
	  custom-class="business-dialog rounded-lg"
	  :title="is_company?'企业管理':'简历管理'"
	  :visible.sync="BusinessDialog"
	  width="600px"
	  :before-close="closeBusiness">
	  <div class="flex flex-center" v-if="is_company">
	  	<div class="font-weight-bold mb-0">{{Find.title}}</div>
	  	<div v-if="Find.attestation" class="small pl-3" :class="'text-'+Find.attestation.type">{{Find.attestation.title}}</div>
	  	<div class="flex-1"></div>
	  	<div class="px-1">
	  		<el-button type="primary" @click="openWinTo" size="mini"
	      	title="免登录跳转至用户中心">企业中心</el-button>
	  	</div>
	  	<div class="px-1">
	  		<el-button type="success" @click="openHomePage" size="mini">预览主页</el-button>
	    </div>
	  </div>
	  <div class="flex flex-center" v-else>
	  	<div class="font-weight-bold mb-0">{{Find.title}}</div>
	  	<div v-if="Find.is_real_name" class="small pl-3 text-success">已实名</div>
	  	<div v-else class="small pl-3 text-secondary">未实名</div>
	  	<div class="flex-1"></div>
	  	<div class="px-1">
	  		<el-button type="primary" @click="openWinTo" size="mini"
	      	title="免登录跳转至用户中心">用户中心</el-button>
	  	</div>
	  	<div class="px-1">
	  		<el-button type="success" @click="openHomePage" size="mini">预览简历</el-button>
	    </div>
	  </div>
	  <div class="flex flex-center text-secondary small pt-3">
	  	<div>账户：{{Find.mobile}}</div>
	  	<div class="pl-3">UID：{{Find.uid}}</div>
	  	<div class="pl-3">IP：{{Find.login_ip}}</div>
	  </div>
	  <div class="flex flex-center pt-3 text-center" v-if="is_company">
	  	<div class="flex-1 pr-2">
	  		<div class="btn-F5F7FB flex flex-v-center">
	  			<i class="el-icon-data-line"></i>
	  			<span>招聘效果</span>
	  		</div>
	  	</div>
	  	<div class="flex-1 px-2">
	  		<div class="btn-F5F7FB flex flex-v-center">
	  			<i class="el-icon-files"></i>
	  			<span>企业模板</span>
	  		</div>
	  	</div>
	  	<div class="flex-1 px-2">
	  		<div class="btn-F5F7FB flex flex-v-center">
	  			<i class="el-icon-picture-outline-round"></i>
	  			<span>微海报</span>
	  		</div>
	  	</div>
	  	<div class="flex-1 px-2">
	  		<div class="btn-F5F7FB flex flex-v-center"
	  		@click="openSendSmsMessage(Find.mobile)">
	  			<i class="el-icon-chat-line-square"></i>
	  			<span>发短信</span>
	  		</div>
	  	</div>
	  	<div class="flex-1 pl-2">
	  		<div class="btn-F5F7FB flex flex-v-center"
	  		@click="openSendEmail(Find.email)">
	  			<i class="el-icon-message"></i>
	  			<span>发邮件</span>
	  		</div>
	  	</div>
	  </div>
	  <div class="flex flex-center pt-3 text-center" v-else>
	  	<div class="flex-1 pr-2">
	  		<div class="btn-F5F7FB flex flex-v-center"
	  		@click="openSendSmsMessage(Find.mobile)">
	  			<i class="el-icon-chat-line-square"></i>
	  			<span>发短信</span>
	  		</div>
	  	</div>
	  	<div class="flex-1 px-2">
	  		<div class="btn-F5F7FB flex flex-v-center"
	  		@click="openSendEmail(Find.email)">
	  			<i class="el-icon-message"></i>
	  			<span>发邮件</span>
	  		</div>
	  	</div>
	  	<div class="flex-1 px-2">
	  	</div>
	  	<div class="flex-1 px-2">
	  	</div>
	  	<div class="flex-1 pl-2">
	  	</div>
	  </div>
	  <table class="table table-bordered text-center mt-3 business-table" v-if="is_company">
	  	<tr>
	  		<td @click="setBusinessDrawer('score')">
	  			<div class="h5">{{Find.score}}</div>
	  			<div class="text-secondary">积分管理</div>
	  		</td>
	  		<td @click="setBusinessDrawer('orders')">
	  			<div class="h5">{{Find.order_finish_sum}}</div>
	  			<div class="text-secondary">订单</div>
	  		</td>
	  		<td @click="setBusinessDrawer('downloaded')">
	  			<div class="h5">{{Find.downloaded_resume}}</div>
	  			<div class="text-secondary">下载简历</div>
	  		</td>
	  		<td @click="setBusinessDrawer('delivery_resume')">
	  			<div class="h5">{{Find.delivery_resume}}</div>
	  			<div class="text-secondary">收到简历</div>
	  		</td>
	  	</tr>
	  	<tr>
	  		<td @click="setBusinessDrawer('invite_aninterview')">
	  			<div class="h5">{{Find.invite_anInterview}}</div>
	  			<div class="text-secondary">面试邀请</div>
	  		</td>
	  		<td @click="setBusinessDrawer('jobs')">
	  			<div class="h5">{{Find.jobs_sum}}</div>
	  			<div class="text-secondary">职位管理</div>
	  		</td>
	  		<td @click="setBusinessDrawer('demeanor')">
	  			<div class="h5">{{Find.demeanor}}</div>
	  			<div class="text-secondary">企业风采</div>
	  		</td>
	  		<td @click="setBusinessDrawer('coupon')">
	  			<div class="h5">{{Find.coupon_sum}}</div>
	  			<div class="text-secondary">优惠券</div>
	  		</td>
	  	</tr>
	  </table>
	  <table class="table table-bordered text-center mt-3 business-table" v-else>
	  	<tr>
	  		<td @click="setBusinessDrawer('score')">
	  			<div class="h5">{{Find.score}}</div>
	  			<div class="text-secondary">积分管理</div>
	  		</td>
	  		<td @click="setBusinessDrawer('orders')">
	  			<div class="h5">{{Find.order_finish_sum}}</div>
	  			<div class="text-secondary">订单</div>
	  		</td>
	  		<td @click="setBusinessDrawer('downloaded')">
	  			<div class="h5">{{Find.downloaded_resume}}</div>
	  			<div class="text-secondary">下载简历</div>
	  		</td>
	  		<td @click="setBusinessDrawer('delivery_resume')">
	  			<div class="h5">{{Find.delivery_resume}}</div>
	  			<div class="text-secondary">申请职位</div>
	  		</td>
	  	</tr>
	  	<tr>
	  		<td @click="setBusinessDrawer('invite_aninterview')">
	  			<div class="h5">{{Find.invite_anInterview}}</div>
	  			<div class="text-secondary">面试邀请</div>
	  		</td>
	  		<td @click="setBusinessDrawer('works')">
	  			<div class="h5">{{Find.works}}</div>
	  			<div class="text-secondary">个人作品</div>
	  		</td>
	  		<td @click="setBusinessDrawer('coupon')">
	  			<div class="h5">{{Find.coupon_sum}}</div>
	  			<div class="text-secondary">优惠券</div>
	  		</td>
	  	</tr>
	  </table>
	  <div class="flex flex-center text-secondary small pt-3">
	  	<div class="pr-3" v-if="is_company">联系人：{{Find.contacts}}</div>
	  	<div class="pr-3" v-else>联系人：{{Find.title}}</div>
	  	<div class="pr-3" v-if="is_company">电话：{{Find.contacts_mobile}}</div>
	  	<div class="pr-3" v-else>电话：{{Find.mobile}}</div>
	  	<div class="pr-3" v-if="Find.email">邮箱：{{Find.email}}</div>
	  	<div v-if="Find.adviser">顾问：{{Find.adviser.nickname}}</div>
	  </div>
	</el-dialog>
	<el-drawer
	  title="我是标题"
	  :with-header="false"
	  size="35%"
	  :visible.sync="BusinessDrawer"
	  direction="rtl">
	  <div class="wrap h-100" v-loading="ajax">
	  	<div class="px-2" v-if="is_company">
		  	<el-tabs v-model="activeName">
			    <el-tab-pane label="基本信息" name="basic"></el-tab-pane>
			    <el-tab-pane label="积分" name="score"></el-tab-pane>
			    <el-tab-pane label="套餐余量" name="vip_rights"></el-tab-pane>
			    <el-tab-pane label="订单" name="orders"></el-tab-pane>
			    <el-tab-pane label="优惠券" name="coupon"></el-tab-pane>
			    <el-tab-pane label="推广" name="extension"></el-tab-pane>
			    <el-tab-pane label="增值服务" name="value_added"></el-tab-pane>
			    <el-tab-pane label="下载简历" name="downloaded"></el-tab-pane>
			    <el-tab-pane label="收到简历" name="delivery_resume"></el-tab-pane>
			    <el-tab-pane label="面试邀请" name="invite_aninterview"></el-tab-pane>
			    <el-tab-pane label="认证信息" name="attestation"></el-tab-pane>
			</el-tabs>
	  	</div>
	  	<div class="px-2" v-else>
		  	<el-tabs v-model="activeName">
			    <el-tab-pane label="积分" name="score"></el-tab-pane>
			    <el-tab-pane label="订单" name="orders"></el-tab-pane>
			    <el-tab-pane label="优惠券" name="coupon"></el-tab-pane>
			    <el-tab-pane label="推广" name="extension"></el-tab-pane>
			    <el-tab-pane label="申请职位" name="delivery_resume"></el-tab-pane>
			    <el-tab-pane label="下载简历" name="downloaded"></el-tab-pane>
			    <el-tab-pane label="面试邀请" name="invite_aninterview"></el-tab-pane>
			    <el-tab-pane label="认证信息" name="attestation"></el-tab-pane>
			</el-tabs>
	  	</div>
	  	<div class="p-3" v-if="Find.id">
	  		<div class="small flex py-1 flex-center">
	  			<div class="title-lable pr-2">{{is_company?'公司名称':'人才名称'}}</div>
	  			<div class="flex-1">
		      	<el-link @click="openWinTo"
		      	:underline="false"
		      	title="免登录跳转至用户中心">{{Find.title}}</el-link>
		      	</div>
	  		</div>
	  		<div class="flex py-1">
		  		<div class="small flex flex-1 flex-center">
		  			<div class="title-lable pr-2">用户</div>
			  		<div class="flex flex-center">
						<el-image
						  	v-if="Find.headimg" 
						    style="width: 30px; height: 30px"
						    class="rounded-circle mr-2"
						    :src="Find.headimg" 
						    :preview-src-list="[Find.headimg]">
						</el-image>
				      	<el-link :href="'/user?uid='+Find.uid" target="_blank"
				      	:underline="false"
				      	title="用户中心">{{Find.nickname}}</el-link>
			      	</div>
		  		</div>
		  		<div class="small flex flex-1 flex-center">
		  			<div class="title-lable pr-2">顾问</div>
			  		<div class="flex flex-center">
						<el-image
						  	v-if="Find.adviser.headimg" 
						    style="width: 30px; height: 30px"
						    class="rounded-circle mr-2"
						    :src="Find.adviser.headimg" 
						    :preview-src-list="[Find.adviser.headimg]">
						</el-image>
			      		<div>
							{{Find.adviser.nickname}}
			      		</div>
			      	</div>
		  		</div>
	  		</div>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='basic'">
		  	<div class="p-3" v-if="Find.id">
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">会员</div>
		  				<div class="flex-1 text-primary">{{Find.company_vip}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">到期时间</div>
		  				<div class="flex-1 text-primary">{{Find.company_vip_time}}</div>
			  		</div>
		  		</div>
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">在招职位</div>
		  				<div class="flex-1 text-primary">{{Find.jobs_sum}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">下载简历点数</div>
		  				<div class="flex-1 text-primary">{{Find.download_resume}}</div>
			  		</div>
		  		</div>
		  	</div>
		  	<el-table
		      	:data="UserLog"
	    		stripe
	    		style="width: 100%;"
	    		height="250">
			    <el-table-column
			      prop="title"
			      label="操作"
			      width="200">
			    </el-table-column>
			    <el-table-column
			      prop="app_name"
			      label="应用"
			      width="80">
			    </el-table-column>
			    <el-table-column
			      prop="ip"
			      label="IP"
			      width="120">
			    </el-table-column>
			    <el-table-column
			      prop="create_time"
			      label="访问时间"
			      width="240">
			    </el-table-column>
		    </el-table>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='score'">
		  	<div class="p-3" v-if="Find.id">
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">积分</div>
		  				<div class="flex-1 text-primary">{{Find.score}}</div>
			  		</div>
		  		</div>
		  	</div>
		  	<el-table
		      	:data="ScoreLog"
	    		stripe
	    		style="width: 100%;"
	    		height="250">
			    <el-table-column
			      prop="desc"
			      label="内容"
			      min-width="200">
			    </el-table-column>
			    <el-table-column
			      prop="score"
			      label="积分"
			      width="100">
			      <template slot-scope="scope">
			      	<div v-if="scope.row.score>0">+{{scope.row.score}}</div>
			      	<div v-else>{{scope.row.score}}</div>
			      </template>
			    </el-table-column>
			    <el-table-column
			      prop="create_time"
			      label="时间"
			      width="180">
			    </el-table-column>
		    </el-table>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='vip_rights'">
		  	<div class="p-3" v-if="Find.id&&Find.rights">
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">发布职位</div>
		  				<div class="flex-1 text-primary">{{Find.rights.release_jobs_sum}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">简历点数</div>
		  				<div class="flex-1 text-primary">{{Find.rights.download_resume}}</div>
			  		</div>
		  		</div>
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">邀请面试</div>
		  				<div class="flex-1 text-primary">{{Find.rights.invite_aninterview}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">刷新次数</div>
		  				<div class="flex-1 text-primary">{{Find.rights.refresh_sum}}</div>
			  		</div>
		  		</div>
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">招聘会场次</div>
		  				<div class="flex-1 text-primary">{{Find.rights.job_fair}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">置顶天数</div>
		  				<div class="flex-1 text-primary">{{Find.rights.top_day}}</div>
			  		</div>
		  		</div>
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">紧急招聘天数</div>
		  				<div class="flex-1 text-primary">{{Find.rights.urgent_day}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">聊天人数</div>
		  				<div class="flex-1 text-primary">{{Find.rights.im_max_people}}</div>
			  		</div>
		  		</div>
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">每日下载简历上限</div>
		  				<div class="flex-1 text-primary">{{Find.rights.today_down_resume}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2"></div>
		  				<div class="flex-1 text-primary"><el-link :href="'/user/vip/giveRights?uid='+Find.uid" target="_blank" type="primary"
				      	:underline="false">赠送权益</el-link></div>
			  		</div>
		  		</div>
		  	</div>
			<el-table
				ref="multipleTable"
		      	:data="VipRights"
	    		stripe
	    		style="width: 100%;"
	    		height="250"
	    		v-loading="rights_search.ajax">
		      <el-table-column
		        label="内容">
			      <template slot-scope="scope">
			      	<div>
				      	<el-link :href="'/user/vip/editRights/'+scope.row.id" target="_blank"
				      	:underline="false"
				      	title="编辑权益">{{scope.row.rule_name}}</el-link>
				    </div>
			      	<div class="text-secondary small">{{scope.row.vip_name}}</div>
			      </template>
		      </el-table-column>
		      <el-table-column
		        label="剩余数量/数量"
		        width="140">
			      <template slot-scope="scope">
		      		<el-popover
						placement="left"
						width="300"
						title="编辑权益"
						trigger="click">
						<el-form label-position="top">
							<el-input v-model="scope.row.surplus_value" class="mb-2" size="mini">
								<template slot="prepend"><div class="w-80px">剩余数量</div></template>
								<template slot="append">{{scope.row.unit}}</template>
							</el-input>
							<el-input v-model="scope.row.value" class="mb-2" size="mini">
								<template slot="prepend"><div class="w-80px">数量</div></template>
								<template slot="append">{{scope.row.unit}}</template>
							</el-input>
						    <el-date-picker
						      v-model="scope.row.expiry_time"
						      align="right"
						      type="date"
						      format="yyyy-M-d"
						      value-format="yyyy-M-d"
						      :picker-options="endPickerOptions"
						      placeholder="End Time" class="mb-2" size="mini">
						    </el-date-picker>
							<div class="flex">
								<div class="flex-1"></div>
								<el-button
						            type="primary"
						            size="mini"
						            :loading="scope.row.status==2"
						            @click="editRights(scope.row)">
						            确定
						        </el-button>
							</div>
						</el-form>
			      	<div class="small flex pointer" slot="reference">
			      		<div>{{scope.row.surplus_value}}{{scope.row.unit}}</div>
			      		<div class="mx-1">/</div>
			      		<div>{{scope.row.value}}{{scope.row.unit}}</div>
					</div>
					</el-popover>
			      </template>
		      </el-table-column>
		      <el-table-column
		        label="时间/过期时间"
		        width="180">
			      <template slot-scope="scope">
			      	<div class="small">
				      	<div>{{scope.row.create_time}}</div>
				      	<div v-if="scope.row.is_expiry==1">已过期</div>
				      	<div v-else-if="!scope.row.status" class="text-primary">已使用</div>
				      	<div v-else>{{scope.row.expiry_time}}</div>
			      	</div>
			      </template>
		      </el-table-column>
		      <el-table-column
		        label="/"
		        width="80">
			      <template slot-scope="scope">
			        <el-button
			            type="danger"
			            size="minism"
			            v-if="scope.row.is_expiry!==1&&scope.row.status"
			            :loading="scope.row.is_expiry==2"
			            @click="invalidRights(scope.row)">
			            作废
			        </el-button>
			      </template>
		      </el-table-column>
		    </el-table>
			<el-pagination
			  background
			  :hide-on-single-page="true"
			  @current-change="setRightsPageChange"
		      :current-page="rights_search.page"
		      :page-size="15"
		      layout="total,  prev, pager, next, jumper"
		      :total="rights_search.total">
		    </el-pagination>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='orders'">
		  	<div class="p-3" v-if="Find.id">
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">订单数量</div>
		  				<div class="flex-1 text-primary">{{Find.order_sum}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">已完成</div>
		  				<div class="flex-1 text-primary">{{Find.order_finish_sum}}</div>
			  		</div>
		  		</div>
		  	</div>
		  	<el-table
		      	:data="OrdersData"
	    		stripe
	    		style="width: 100%;"
	    		height="250">
		      <el-table-column
		        prop="otitle"
		        label="名称">
		      </el-table-column>
		      <el-table-column
		      	prop="oprice"
		        label="订单金额"
		        width="100">
		      </el-table-column>
		      <el-table-column
		      	prop="score"
		        label="抵扣积分"
		        width="100">
		      </el-table-column>
		      <el-table-column
		        label="状态"
		        width="100">
			      <template slot-scope="scope">
			      	<span class="text-dark" v-if="scope.row.status===0">待支付</span>
			      	<span class="text-danger" v-if="scope.row.status===1">已支付</span>
			      	<span class="text-success" v-if="scope.row.status===2">已完成</span>
			      	<span class="text-secondary" v-if="scope.row.status===-1">已取消</span>
			      	<span class="text-danger small" v-if="scope.row.delete_time">(删)</span>
			      </template>
		      </el-table-column>
		      <el-table-column
		        label="时间线"
		        width="180">
			      <template slot-scope="scope">
			        <el-popover trigger="hover" placement="top">
			          <p>创建时间: {{ scope.row.create_time }}</p>
			          <p>更新时间: {{ scope.row.update_time }}</p>
			          <p v-if="scope.row.status===0">过期时间: {{ scope.row.expire_time }}</p>
			          <p v-if="scope.row.status===1 || scope.row.status===2">支付时间: {{ scope.row.pay_time }}</p>
			          <p v-if="scope.row.status===1 || scope.row.status===2">完成时间: {{ scope.row.finish_time }}</p>
			          <p v-if="scope.row.status===-1">取消时间: {{ scope.row.cancel_time }}</p>
			          <p v-if="scope.row.delete_time">删除时间: {{ scope.row.delete_time }}</p>
			          <div slot="reference" class="name-wrapper">
			            <el-tag size="small" type="info">{{ scope.row.create_time }}</el-tag>
			          </div>
			        </el-popover>
			      </template>
		      </el-table-column>
		    </el-table>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='coupon'">
		  	<div class="p-3" v-if="Find.id">
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">可用优惠券</div>
		  				<div class="flex-1 text-primary">{{Find.coupon_sum}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">已过期</div>
		  				<div class="flex-1 text-primary">{{Find.expiry_coupon_sum}}</div>
			  		</div>
		  		</div>
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">已使用</div>
		  				<div class="flex-1 text-primary">{{Find.use_coupon_sum}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">赠送</div>
		  				<div class="flex-1 text-primary">{{Find.give_coupon_sum}}</div>
			  		</div>
		  		</div>
		  		<div class="py-1 flex">
				  <el-select
				    v-model="coupon_id"
				    filterable
				    remote
				    reserve-keyword
				    placeholder="搜索优惠券名"
				    :remote-method="getCoupon"
				    :loading="loading"
				    size="mini"
				    popper-class="business-el-select-dropdown__item"
				    class="flex-1 mr-2"
			    	@focus="getCoupon('')">
				    <el-option
				      v-for="item in CouponData"
				      :key="item.id"
				      :label="getCouponLabel(item)"
				      :value="item.id">
				      <div class="flex" style="min-width: 300px;">
				      	<div class="flex-1">
						   	<div>[{{item.superposition?'可叠加':'不叠加'}}]-{{item.title}}</div>
						   	<div class="small text-primary">
						   		剩余：{{item.surplus_stock}}
						   	</div>
				      	</div>
				      	<div class="flex-1 text-right">
					      	<div class="flex">
					      		<div class="flex-1"></div>
						  		<div class="mr-2">满</div>
						    	<div>{{item.satisfy_price}}</div>
						  		<div class="mx-2" v-if="item.type">打</div>
						  		<div class="mx-2" v-else>减</div>
						    	<div v-if="item.type"><span v-if="item.discount/10<10">{{item.discount/10}}</span>折</div>
						    	<div v-else>{{item.price}}元</div>
					    	</div>
					    	<div class="small" v-if="item.use_start_time">{{item.use_start_time}}可用</div>
				      	</div>
				      </div>
				    </el-option>
				  </el-select>
				  <el-button type="primary" @click="giveUserCoupon" size="mini">赠送</el-button>
				  <div class="flex-1"></div>
		  		</div>
		  	</div>
			<el-table
		      	:data="CouponListData"
	    		stripe
	    		style="width: 100%;"
	    		height="250">
		      <el-table-column
		        label="券名"
		        min-width="200">
			      <template slot-scope="scope">
				   	<div>{{scope.row.title}}</div>
				   	<div class="small text-primary">
					   	<div v-if="scope.row.alias_list.length">{{scope.row.alias_list.join('，')}}</div>
					   	<div v-else>全品类</div>
					   	<div>{{scope.row.alias}}</div>
				   	</div>
			      </template>
		      </el-table-column>
		      <el-table-column
		        label="规则"
		        width="200">
			      <template slot-scope="scope">
			      	<div class="flex">
				  		<div class="mr-2">满</div>
				    	<div>{{scope.row.satisfy_price}}</div>
				  		<div class="mx-2" v-if="scope.row.type">打</div>
				  		<div class="mx-2" v-else>减</div>
				    	<div v-if="scope.row.type"><span v-if="scope.row.discount/10<10">{{scope.row.discount/10}}</span>折</div>
				    	<div v-else>{{scope.row.price}}元</div>
			    	</div>
			    	<div class="small" v-if="scope.row.limit_sum">每个用户可领取{{scope.row.limit_sum}}次</div>
			    	<div class="small" v-else>每个用户可领取不限次</div>
			    	<div class="small" v-if="scope.row.start_time">{{scope.row.start_time}}可用</div>
					<div class="small" v-if="scope.row.vip_level>0">{{scope.row.vip_name}}可用</div>
			      </template>
		      </el-table-column>
		      <el-table-column
		        label="叠加/状态"
		        width="120">
			      <template slot-scope="scope">
			      	<div>
			      		<el-button type="success" size="minism" v-if="scope.row.superposition">可叠加</el-button>
			      		<el-button type="info" size="minism" v-else>不叠加</el-button>
			      	</div>
			      	<div>
			      		<el-button type="info" size="minism"
			      		v-if="scope.row.status==-1">已过期</el-button>
			      		<el-button type="info" size="minism"
			      		v-if="scope.row.status==0">不可用</el-button>
			      		<el-button type="success" size="minism"
			      		v-if="scope.row.status==1">可使用</el-button>
			      		<el-button type="danger" size="minism"
			      		v-if="scope.row.status==2">已使用</el-button>
			      	</div>
			      </template>
		      </el-table-column>
		      <el-table-column
		        label="时间线"
		        width="180">
			      <template slot-scope="scope">
			        <el-popover trigger="hover" placement="top">
			          <p>创建时间: {{ scope.row.create_time }}</p>
			          <p>更新时间: {{ scope.row.update_time }}</p>
			          <p>可用时间: {{ scope.row.start_time }}</p>
			          <p>过期时间: {{ scope.row.end_time }}</p>
			          <p>领取时间: {{ scope.row.receive_time }}</p>
			          <p>使用时间: {{ scope.row.use_time }}</p>
			          <div slot="reference" class="name-wrapper">
			            <el-tag size="small" type="info">{{ scope.row.create_time }}</el-tag>
			          </div>
			        </el-popover>
			      </template>
		      </el-table-column>
		    </el-table>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='extension'">
		  	<div class="p-3" v-if="Find.id">
		  		<div class="flex py-1" v-if="is_company">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">置顶</div>
		  				<div class="flex-1 text-primary">{{Find.top_sum}}</div>
			  		</div>
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">职位紧急</div>
		  				<div class="flex-1 text-primary">{{Find.recommend_sum}}</div>
			  		</div>
		  		</div>
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">自动刷新</div>
		  				<div class="flex-1 text-primary">{{Find.refresh_auto}}</div>
			  		</div>
			  	</div>
		  	</div>
		  	<el-table
		      	:data="ExtensionData"
	    		stripe
	    		style="width: 100%;"
	    		height="250">
		      <el-table-column
		        prop="jobs_name"
		        label="职位名称">
		      </el-table-column>
		      <el-table-column
		      	prop="type"
		        label="类型"
		        width="100">
		      </el-table-column>
		      <el-table-column
		      	prop="start_time"
		        label="开始日期"
		        width="180">
		      </el-table-column>
		      <el-table-column
		      	prop="end_time"
		        label="结束日期"
		        width="180">
		      </el-table-column>
		      <el-table-column
		        label="数量"
		        width="100">
			      <template slot-scope="scope">
			      	{{scope.row.value}}{{scope.row.unit}}
			      </template>
		      </el-table-column>
		    </el-table>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='value_added'">
		  	<el-table
		      	:data="OrdersData"
	    		stripe
	    		style="width: 100%;"
	    		height="250">
		      <el-table-column
		        prop="otitle"
		        label="名称">
		      </el-table-column>
		      <el-table-column
		      	prop="oprice"
		        label="订单金额"
		        width="100">
		      </el-table-column>
		      <el-table-column
		      	prop="score"
		        label="抵扣积分"
		        width="100">
		      </el-table-column>
		      <el-table-column
		        label="状态"
		        width="100">
			      <template slot-scope="scope">
			      	<span class="text-dark" v-if="scope.row.status===0">待支付</span>
			      	<span class="text-danger" v-if="scope.row.status===1">已支付</span>
			      	<span class="text-success" v-if="scope.row.status===2">已完成</span>
			      	<span class="text-secondary" v-if="scope.row.status===-1">已取消</span>
			      	<span class="text-danger small" v-if="scope.row.delete_time">(删)</span>
			      </template>
		      </el-table-column>
		      <el-table-column
		        label="时间线"
		        width="180">
			      <template slot-scope="scope">
			        <el-popover trigger="hover" placement="top">
			          <p>创建时间: {{ scope.row.create_time }}</p>
			          <p>更新时间: {{ scope.row.update_time }}</p>
			          <p v-if="scope.row.status===0">过期时间: {{ scope.row.expire_time }}</p>
			          <p v-if="scope.row.status===1 || scope.row.status===2">支付时间: {{ scope.row.pay_time }}</p>
			          <p v-if="scope.row.status===1 || scope.row.status===2">完成时间: {{ scope.row.finish_time }}</p>
			          <p v-if="scope.row.status===-1">取消时间: {{ scope.row.cancel_time }}</p>
			          <p v-if="scope.row.delete_time">删除时间: {{ scope.row.delete_time }}</p>
			          <div slot="reference" class="name-wrapper">
			            <el-tag size="small" type="info">{{ scope.row.create_time }}</el-tag>
			          </div>
			        </el-popover>
			      </template>
		      </el-table-column>
		    </el-table>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='downloaded'">
		  	<div class="p-3" v-if="Find.id">
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">总下载</div>
		  				<div class="flex-1 text-primary">{{Find.downloaded_resume}}</div>
			  		</div>
		  		</div>
		  	</div>
		  	<el-table
		      	:data="DownloadedResumeData"
	    		stripe
	    		style="width: 100%;"
	    		height="250">
		      <el-table-column
		        prop="company_name"
		        label="企业">
		      </el-table-column>
		      <el-table-column
		        prop="name"
		        label="简历"
		        width="200">
		      </el-table-column>
		      <el-table-column
		      	prop="create_time"
		        label="日期"
		        width="180">
		      </el-table-column>
		    </el-table>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='delivery_resume'">
		  	<div class="p-3" v-if="Find.id">
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">{{is_company?'总收到':'总投递'}}</div>
		  				<div class="flex-1 text-primary">{{Find.delivery_resume}}</div>
			  		</div>
		  		</div>
		  	</div>
		  	<el-table
		      	:data="JobsDeliveryResumeData"
	    		stripe
	    		style="width: 100%;"
	    		height="250">
		      <el-table-column
		        prop="name"
		        label="简历"
		        v-if="is_company">
		      </el-table-column>
		      <el-table-column
		        prop="company_name"
		        label="企业"
		        v-if="!is_company">
		      </el-table-column>
		      <el-table-column
		        prop="jobs_name"
		        label="职位">
		      </el-table-column>
		      <el-table-column
		      	prop="create_time"
		        label="日期"
		        width="180">
		      </el-table-column>
		    </el-table>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='invite_aninterview'">
		  	<div class="p-3" v-if="Find.id">
		  		<div class="flex py-1">
			  		<div class="small flex flex-1 flex-center">
			  			<div class="title-lable pr-2">{{is_company?'总发出':'总收到'}}</div>
		  				<div class="flex-1 text-primary">{{Find.invite_anInterview}}</div>
			  		</div>
		  		</div>
		  	</div>
		  	<el-table
		      	:data="InviteAninterviewData"
	    		stripe
	    		style="width: 100%;"
	    		height="250">
		      <el-table-column
		        prop="name"
		        label="简历"
		        v-if="is_company">
		      </el-table-column>
		      <el-table-column
		        prop="company_name"
		        label="企业"
		        v-if="!is_company">
		      </el-table-column>
		      <el-table-column
		        prop="title"
		        label="职位">
		      </el-table-column>
		      <el-table-column
		      	prop="create_time"
		        label="日期"
		        width="180">
		      </el-table-column>
		    </el-table>
	  	</div>
	  	<div class="flex1 wrap" v-show="activeName=='attestation'">
		  	<div class="flex1 p-4 overflow-auto" v-if="AttestationData.id">
      			<div class="flex flex-center pb-3">
      				<div class="title-lable">名称</div>
      				<div class="flex-1">{{AttestationData.name}}</div>
      			</div>
      			<div class="flex flex-center pb-3">
      				<div class="title-lable">身份类型</div>
		      		<div class="flex-1 text-primary" v-if="AttestationData.id_type==0">个人</div>
		      		<div class="flex-1 text-primary" v-if="AttestationData.id_type==1">企业</div>
		      		<div class="flex-1 text-primary" v-if="AttestationData.id_type==2">其他组织</div>
      			</div>
      			<div class="flex flex-center pb-3">
      				<div class="title-lable">身份证或统一社会信用代码</div>
      				<div class="flex-1">{{AttestationData.id_number}}</div>
      			</div>
      			<div class="flex flex-center pb-3" v-if="is_company">
      				<div class="title-lable">联系人</div>
      				<div class="flex-1">{{AttestationData.contacts}}</div>
      			</div>
      			<div class="flex flex-center pb-3" v-if="is_company">
      				<div class="title-lable">手机号</div>
      				<div class="flex-1">{{AttestationData.mobile}}</div>
      			</div>
      			<div class="flex flex-center pb-3" v-if="is_company">
      				<div class="title-lable">地址</div>
      				<div class="flex-1">{{AttestationData.area1}}{{AttestationData.area2}}{{AttestationData.area3}}{{AttestationData.address}}</div>
      			</div>
      			<div class="flex flex-center pb-3">
      				<div class="title-lable">状态</div>
		      		<div class="flex-1 text-success" v-if="AttestationData.status==1">正常</div>
		      		<div class="flex-1 text-danger" v-else-if="AttestationData.status==2">拒绝</div>
		      		<div class="flex-1 text-secondary" v-else>待审核</div>
      			</div>
      			<div class="flex flex-center pb-3">
      				<div class="title-lable">身份证人像面</div>
		      		<div class="flex-1">
						<el-image
						  	v-if="AttestationData.img1" 
						    style="width: 200px; max-height: 200px"
						    :src="AttestationData.img1" 
						    :preview-src-list="[AttestationData.img1,AttestationData.img2,AttestationData.img3,AttestationData.img4]">
						</el-image>
		      		</div>
      			</div>
      			<div class="flex flex-center pb-3">
      				<div class="title-lable">身份证国徽面</div>
		      		<div class="flex-1">
						<el-image
						  	v-if="AttestationData.img2" 
						    style="width: 200px; max-height: 200px"
						    :src="AttestationData.img2" 
						    :preview-src-list="[AttestationData.img1,AttestationData.img2,AttestationData.img3,AttestationData.img4]">
						</el-image>
		      		</div>
      			</div>
      			<div class="flex flex-center pb-3" v-if="is_company">
      				<div class="title-lable">营业执照</div>
		      		<div class="flex-1">
						<el-image
						  	v-if="AttestationData.img3" 
						    style="width: 200px; max-height: 200px"
						    :src="AttestationData.img3" 
						    :preview-src-list="[AttestationData.img1,AttestationData.img2,AttestationData.img3,AttestationData.img4]">
						</el-image>
		      		</div>
      			</div>
      			<div class="flex flex-center pb-3" v-if="is_company">
      				<div class="title-lable">补充材料</div>
		      		<div class="flex-1">
						<el-image
						  	v-if="AttestationData.img4" 
						    style="width: 200px; max-height: 200px"
						    :src="AttestationData.img4" 
						    :preview-src-list="[AttestationData.img1,AttestationData.img2,AttestationData.img3,AttestationData.img4]">
						</el-image>
		      		</div>
      			</div>
		  	</div>
		  	<div class="text-center text-secondary py-5" v-else>无认证信息</div>
	  	</div>
	  </div>
	</el-drawer>
	<el-dialog
	  title=""
	  :visible.sync="BusinessSmsMessageDialog"
	  width="500px"
	  :with-header="false">
		<el-form :model="smsMessageFrom" label-width="120px" :rules="rules" ref="smsMessageFrom" size="small">
			<el-form-item label="接收者" prop="mobile">{{smsMessageFrom.mobile}}</el-form-item>
			<el-form-item label="短信内容" prop="content">
				<el-input type="textarea" v-model="smsMessageFrom.content" class="col-12 pl-0 pr-0" :autosize="{ minRows: 6, maxRows: 20}" maxlength="200" show-word-limit></el-input>
			</el-form-item>
		</el-form>
		<div slot="footer">
		    <el-button @click="BusinessSmsMessageDialog=false" size="mini">取 消</el-button>
		    <el-button type="primary" @click="sendSmsMessage('smsMessageFrom');" :loading="smsMessageFrom.ajax" size="mini">{{smsMessageFrom.ajax?'发送中...':'发送'}}</el-button>
		</div>
	</el-dialog>
</div>
<script type="text/javascript">
	var Business=new Vue({
		el:'#Business',
		data:{
			ajax:false,
			loading:false,
			Find:{},
			UserLog:[],
			ScoreLog:[],
			search_type:'company_id',
			orderSearch:{
				uid:'',
				otrade:'',
				status:'all',
				pay_type:'all',
				type:[],
				time:[],
				ajax:false,
				page:1,
				total:0,
				pageSize:100
			},
			coupon_id:'',
			rights_search:{
				search_type:'uid',
				key:'',
				company_id:'',
				status:'all',
		    	ajax:false,
				total:0,
				page: 1
			},
	        endPickerOptions: {
	          disabledDate(time) {
	            return time.getTime() < Date.now();
	          },
	      	},
			VipRights:[],
			OrdersData:[],
			CouponData:[],
			CouponListData:[],
			ExtensionData:[],
			DownloadedResumeData:[],
			JobsDeliveryResumeData:[],
			InviteAninterviewData:[],
			AttestationData:{},
			smsMessageFrom:{
				ajax:false,
				mobile:'',
				content:''
			},
			BusinessDrawer:false,
			BusinessDialog:false,
			BusinessSmsMessageDialog:false,
			activeName:'basic',
			is_company:false,
	        rules: {
	          mobile: [
	            { required: true, message: '接收者不能为空', trigger: 'change' },
	          ],
	          content: [
	            { required: true, message: '请输入短信内容', trigger: 'blur' },
	          ],
	        }
		},
		watch:{
			activeName(val,oldVal){
				if(!this.Find.id)return;
				switch(val){
					case 'basic':
						this.getUserLog();
					case 'score':
						this.getScoreLog();
					break;
					case 'vip_rights':
						this.getVipRights();
					break;
					case 'orders':
						this.orderSearch.uid=this.Find.uid;
						this.orderSearch.type=[];
						this.getOrders();
					break;
					case 'coupon':
						this.getCouponList();
					break;
					case 'extension':
						this.getExtension();
					break;
					case 'value_added':
						this.orderSearch.uid=this.Find.uid;
						this.orderSearch.type=[2,3,4,5,6,7,8,9];
						this.getOrders();
					break;
					case 'downloaded':
						this.getDownloadedResume();
					break;
					case 'delivery_resume':
						this.getJobsDeliveryResume();
					break;
					case 'invite_aninterview':
						this.getInviteAninterview();
					break;
					case 'attestation':
						this.getAttestation();
					break;
				}
			}
		},
	    methods: {
	    	openBusiness(id,is_company){
	    		if(!is_company){
	    			this.activeName='score';
	    			this.search_type='resume_id';
	    		}
	    		this.is_company=is_company;
	      		var _this=this;
	    		this.ajax=true;
				$.ajax({
					url:'/business',
					type:'get',
					data:{id:id,role_type:is_company?1:0},
					dataType:'json',
					error:function(err){
	      				_this.ajax=false;
	    				_this.BusinessDialog=false;
						XYBase.error(XYBase.config.system_network_error);
					},
					success:function(ret){
	      				_this.ajax=false;
						if (ret) {
							if (ret.code === 0) {
								_this.Find=ret.data;
	    						_this.BusinessDialog=true;
	    						_this.getUserLog();
							}else{
	    						_this.BusinessDialog=false;
								XYBase.msg(ret.msg);
							}
						}else{
							XYBase.error(XYBase.config.system_network_error);
						}
					}
				});
	    	},
	    	setBusinessDrawer(activeName) {
	    		switch(activeName){
	    			case 'jobs':
	    			window.open('/jobs?company_id='+this.Find.id);
	    			break;
	    			case 'demeanor':
	    			window.open('/company/demeanor?company_id='+this.Find.id);
	    			break;
	    			case 'works':
	    			window.open('/resume/works?resume_id='+this.Find.id);
	    			break;
	    			default:
		    		this.BusinessDrawer=true;
		    		this.activeName=activeName;
	    			break;
	    		}
	    	},
	      	getUserLog() {
	      		var _this=this;
				$.ajax({
					url:'/user/apiLog',
					type:'get',
					data:{
						uid:_this.Find.uid,
						app_id:'',
						api_id:'',
						ip:'',
						time:[],
						page:1,
						pageSize:100
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.UserLog=ret.data.data;
							}
						}
					}
				});
			},
	      	getScoreLog() {
	      		var _this=this;
				$.ajax({
					url:'/user/score',
					type:'get',
					data:{
						uid:_this.Find.uid,
						page:1,
						pageSize:100
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.ScoreLog=ret.data.data;
							}
						}
					}
				});
			},
			setRightsPageChange(val){
				this.rights_search.page=val;
				this.getVipRights();
			},
			getVipRights(){
				var _this=this;
				_this.rights_search.key=_this.Find.uid;
				_this.rights_search.company_id=_this.Find.id;
				_this.rights_search.ajax=true;
				$.ajax({
					url:'/user/vip/getRights',
					data:_this.rights_search,
					type:'get',
					dataType:'json',
					success:function(ret){
						_this.rights_search.ajax=false;
						if (ret) {
							_this.VipRights=[];
							_this.rights_search.total=ret.data.total;
							if (ret.code === 0) {
								var Data=ret.data.data;
								if (_this.rights_search.type=='rights')
									Data.sort(function(x,y){
										return x.is_expiry-y.is_expiry;
									});
								_this.VipRights=Data;
							}else XYBase.msg(ret.msg);
						}
					}
				});
			},
			
	    	editRights(data){
	    		if (data.status==2) return;
				data.status=2;
				$.ajax({
					url:'/user/vip/editRights/'+data.id,
					data:data,
					type:'post',
					dataType:'json',
					success:function(ret){
				        if (ret) {
							if(ret.code == 0){
								XYBase.success(ret.msg);
								data.value=ret.data.value;
								data.surplus_value=ret.data.surplus_value;
								data.status=ret.data.status;
								data.expiry_time=ret.data.expiry_time;
								data.is_expiry=ret.data.is_expiry;
							}else{
								XYBase.msg(ret.msg);
							}
				        }else{
			          		XYBase.error(XYBase.config.system_network_error)
				        }
					},
					error:function(err){
			          	XYBase.error(XYBase.config.system_network_error)
					}
				});
	    	},
	    	invalidRights(data){
	    		if (data.is_expiry==2) return;
	    		data.is_expiry=2;
	    		$.getJSON('/user/vip/invalidRights/'+data.id,function(ret){
	    			data.is_expiry=0;
	    			if (ret) {
	    				if (ret.code === 0) {
	    					data.is_expiry=1;
	    				}else{
	    					XYBase.msg(ret.msg);
	    				}
	    			}else{
						XYBase.error(XYBase.config.system_network_error);
	    			}
	    		});
	    	},
	      	getOrders() {
	      		var _this=this;
				$.ajax({
					url:'/orders',
					type:'get',
					data:_this.orderSearch,
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.OrdersData=ret.data.data;
							}
						}
					}
				});
			},
	      	getCouponList() {
	      		var _this=this;
				$.ajax({
					url:'/coupon/list',
					type:'get',
					data:{
						key:_this.Find.uid,
						search_type:'uid',
						status:'all',
						sort:'user',
						page:1,
						total:0,
						pageSize:100
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.CouponListData=ret.data.data;
							}
						}
					}
				});
			},
	      	getCoupon(query) {
	      		var _this=this;
				$.ajax({
					url:'/coupon',
					type:'get',
					data:{
						key:query,
						search_type:'title',
						status:1,
						page:1,
						total:0,
						pageSize:100
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.coupon_id='';
								_this.CouponData=ret.data.data;
							}
						}
					}
				});
			},
			getCouponLabel(item){
				var label=item.title;
				label+=' - 满';
				label+=item.satisfy_price;
				if (item.type) {
					label+='打';
					label+=item.discount/10;
					label+='折';
				}else{
					label+='减';
					label+=item.price;
					label+='元';
				}
				return label;
			},
			giveUserCoupon() {
	      		var _this=this;
				$.ajax({
					url:'/coupon/giveUserCoupon',
					type:'post',
					data:{
						coupon_id:_this.coupon_id,
						uid:_this.Find.uid,
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.getCouponList();
								XYBase.success(ret.msg);
							}else{
								XYBase.msg(ret.msg);
							}
						}
					}
				});
			},
	      	getExtension() {
	      		var _this=this;
				$.ajax({
					url:'/business/getExtension',
					type:'get',
					data:{
						key:_this.Find.uid,
						search_type:'uid',
						page:1,
						total:0,
						pageSize:100
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.ExtensionData=ret.data.data;
							}
						}
					}
				});
			},
	      	getDownloadedResume() {
	      		var _this=this;
				$.ajax({
					url:'/resume/resume-downloaded',
					type:'get',
					data:{
						key:_this.Find.id,
						search_type:_this.search_type,
						page:1,
						total:0,
						pageSize:100
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.DownloadedResumeData=ret.data.data;
							}
						}
					}
				});
			},
	      	getJobsDeliveryResume() {
	      		var _this=this;
				$.ajax({
					url:'/jobs/delivery_resume',
					type:'get',
					data:{
						key:_this.Find.id,
						search_type:_this.search_type,
						page:1,
						total:0,
						pageSize:100
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.JobsDeliveryResumeData=ret.data.data;
							}
						}
					}
				});
			},
	      	getInviteAninterview() {
	      		var _this=this;
				$.ajax({
					url:'/jobs/inviteAnInterview',
					type:'get',
					data:{
						key:_this.Find.id,
						search_type:_this.search_type,
						page:1,
						total:0,
						pageSize:100
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.InviteAninterviewData=ret.data.data;
							}
						}
					}
				});
			},
	      	getAttestation() {
	      		var _this=this;
				$.ajax({
					url:'/user/real_name',
					type:'get',
					data:{
						key:_this.Find.uid,
						search_type:'uid',
						status:'all',
						id_type:'all',
						page:1,
						total:0,
						pageSize:1
					},
					dataType:'json',
					success:function(ret){
						if (ret) {
							if (ret.code === 0) {
								_this.AttestationData=ret.data.data[0];
							}
						}
					}
				});
			},
	    	closeBusiness(done){
	    		done();
	    		this.ajax=false;
	    		this.Find={};
	    		this.UserLog=[];
	    		this.ScoreLog=[];
	    		this.OrdersData=[];
	    		this.ExtensionData=[];
	    		this.DownloadedResumeData=[];
	    		this.JobsDeliveryResumeData=[];
	    		this.InviteAninterviewData=[];
	    		this.AttestationData={};
	    		this.activeName='basic';
	    	},
	    	openSendEmail(email){
	    		if(!email) return XYBase.msg('该用户未绑定邮箱');
	    		window.open('/sendEmail?email='+email);
	    	},
			openSendSmsMessage(mobile){
				this.smsMessageFrom.mobile=mobile;
				this.smsMessageFrom.ajax=false;
				this.BusinessSmsMessageDialog=true;
			},
			sendSmsMessage(formName) {
				var _this=this;
				_this.$refs[formName].validate((valid) => {
				  if (valid) {
				  	_this.smsMessageFrom.ajax=true;
				  	$.ajax({
				  		url:'/sendSmsMessage',
				  		data:_this.smsMessageFrom,
				  		type:'post',
				  		dataType:'json',
				  		error:function(err){
				  			_this.smsMessageFrom.ajax=false;
				  			XYBase.error(XYBase.config.system_network_error);
				  		},
				  		success:function(ret){
				  			_this.smsMessageFrom.ajax=false;
				  			if(ret){
				  				if(ret.code===0){
									_this.$refs[formName].resetFields();
				  					XYBase.success(ret.msg);
				  					_this.BusinessSmsMessageDialog=false;
				  				}else{
				  					XYBase.msg(ret.msg);
				  				}
				  			}else XYBase.error(XYBase.config.system_network_error);
				  		}
				  	})
				  } else {
					return XYBase.warning('请先把表单填写完整。');
				  }
				});
			},
	    	openWinTo(){
		        this.$confirm('即将免登录打开【'+this.Find.title+'】,是否继续？', '提示', {
		        	dangerouslyUseHTMLString:true,
		          confirmButtonText: '继续',
		          cancelButtonText: '取消',
		          type: 'warning'
		        }).then(() => {
	    			window.open('user/exemptLoginRedirect/'+this.Find.uid+'?path=/user/account');
		        }).catch(() => {
					XYBase.msg('已取消');
		        });
	    	},
	    	openHomePage(){
	    		if (this.is_company) {
	    			window.open('{:config('web.url')}/company/'+this.Find.id+'.html');
	    		}else{
	    			window.open('/resume/find/'+this.Find.id);
	    		}
	    	},
	    }
	});
</script>