<template>
	<view>
		<!-- 模态框 -->
		<view class="cu-modal" :class="show?'show':''">
			<view class="cu-dialog">
				<view class="padding-xl" style="text-align: left;">
					<view class="text-bold text-lg margin-bottom-sm">本订单属指定保险全程保障的订单</view>
					<view>1、本订单已打通保险系统，根据接单人员信息自动生效保险保单(立即生效)</view>
					<view>2、确保上门人员与系统接单人员为同一人,便能成功将上门人员纳入保险系统承保。</view>
					<view>3、接单后需派单下级人员 (或改派换人)下级需进系统接单，其保险方能生效! </view>
					<view style="font-size: 15px;padding-top: 20rpx;">雇佣保险：{{data.insuranceManager.insuranceName}}<text class="text-main-color" style="margin-left: 20rpx;" @click="goInfo(data.insuranceManager.insuranceUrl)">详情条款</text></view>
					<view style="padding-top: 20rpx;">
						<checkbox style="transform:scale(0.6)" class="main-color" :checked="true" disabled>
						</checkbox>
						<text class="margin-left-xs">
							<text class="text-red">如未按规则办理，心存侥幸，导致上门人员脱保将负全责!</text>
						</text>
					</view>
				</view>
				<view class="cu-bar bg-white solid-top">
					<view class="action margin-0 flex-sub text-main-color" data-modal="showAcceptOrderNoticeModal"
						@click="hideModal">同意/确认</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'acceptOrderNotice',
		emits: ['close'],
		props: {
			show: {
				type: Boolean,
				default: false
			},
			data: {
				type: Object,
				default: () => {}
			}
		},
		data() {
			return {
			}
		},
		methods: {
			hideModal() {
				this.$emit('close');
			},
			goInfo(url) {
				uni.setClipboardData({
					data: url,
					success: () => {
						uni.showToast({
							icon: 'none',
							title: '链接已复制，请在浏览器打开'
						});		
					},
					fail(e) {
						console.log(e);
					}
				});
			}
		}
	}
</script>

<style>
</style>
