<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<title>订单管理</title>
	<link rel="stylesheet" href="__VUE__/css/storeOrder.css">
	<link rel="stylesheet" href="__VUE__/css/base.css">
</head>
<body>
	<div id="wrapper">
		<template>
			<transition name="fade">
				<div class="reason_wrapper"  v-if="refuseState">
					<div id="reason">
						<div class="reason_header">拒绝原因</div>
						<textarea name="" id="" v-model="reason" v-on:input="countLimite" maxlength="100"></textarea>
						<div class="count_box"><span class="count" v-text="reason.length"></span>/100</div>
						<div id="update" @click="update()">提交</div>
						<div class="close_btn" @click="close()">
							<div>×</div>
						</div>
					</div>
				</div>
			</transition>
		</template>
		<template>
			<transition name="fade">
				<div class="reason_wrapper"  v-if="cancelState">
					<div id="reason">
						<div class="reason_header">取消原因</div>
						<textarea name="" id="" v-model="cancelReason" v-on:input="limited" maxlength="100"></textarea>
						<div class="count_box"><span class="count" v-text="cancelReason.length"></span>/100</div>
						<div id="update" @click="cancelOrderFn()">提交</div>
						<div class="close_btn" @click="close()">
							<div>×</div>
						</div>
					</div>
				</div>
			</transition>
		</template>
		<div class="tab_header">
			<div class="tab_item" :class="tabState==0?'active':''" @click="changeTab(0)">	未接收订单
			<div class="tab_item_bar" :style="tabState==1?'display:none':''"></div>
			</div>
			<div class="tab_item" :class="tabState==1?'active':''" @click="changeTab(1)">	派送中订单
				<div class="tab_item_bar" :style="tabState==0?'display:none':''"></div>
			</div>
		</div>
		<div class="tab_box">
			<div class="order_list" :class="tabState==0?'active':''">
				<div class="order_item" v-for="(item,index) in layOrder" @click="check(item.id,item.order_sn,0)">
					<div class="order_info">
						<div class="order_name">商品：{{item.goods_name}}</div>
						<div class="order_code">订单编号：<span class="order_num">{{item.order_sn}}</span>
						</div>
					</div>
					<div class="order_btn_box">
						<div class="check_order" @click.stop="getOrder(item.id)">接单</div>
						<div class="refuse_order" @click.stop="refuse(item.id,index)">拒绝</div>
					</div>
				</div>
			</div>
			<div class="order_list" :class="tabState==1?'active':''">
				<div class="order_item" v-for="(item,index) in deliOrder"@click="check(item.id,item.order_sn,1)">
					<div class="order_info">
						<div class="order_name">商品：{{item.goods_name}}</div>
						<div class="order_code">订单编号：<span class="order_num">{{item.order_sn}}</span>
						</div>
					</div>
					<div class="order_btn_box">
						<div class="refuse_order" @click.stop="cancel(item.id,index)">取消</div>
						<div class="check_order" @click.stop='arrive(item.id,index)'>送达</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script src="__VUE__/js/vue.js"></script>
	<script src="__VUE__/js/jquery-2.1.4.min.js"></script>
	<script src="__VUE__/js/storeOrder.js"></script>
</body>
</html>