<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<title>商户订单</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
<script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
<script src="https://cdn.staticfile.org/vue-resource/1.5.1/vue-resource.min.js"></script>
<script src="https://cdn.bootcss.com/dayjs/1.7.8/dayjs.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.13.1/bootstrap-table.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.13.1/bootstrap-table.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.13.1/locale/bootstrap-table-zh-CN.min.js"></script>
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<script src="https://unpkg.com/art-template@4.13.2/lib/template-web.js"></script>
<link href="/css/common/common.css" rel="stylesheet" type="text/css">
<script id="platform-order-detail" type="text/html">
	<div class="table-detail">
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">订单有效时间:</div>
				<div class="col-sm-7 table-detail-item-value">{{platformOrderInfo.usefulTime }}</div>
		</div>	
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">商户确认时间:</div> 
				<div class="col-sm-7 table-detail-item-value">{{platformOrderInfo.platformConfirmTime }}</div>
		</div>	
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">系统处理时间:</div>
				<div class="col-sm-7 table-detail-item-value">{{platformOrderInfo.dealTime }}</div>
		</div>	
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">备注:</div> 
				<div class="col-sm-7 table-detail-item-value">{{platformOrderInfo.note }}</div>
		</div>	
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">支付地址:</div> 
				<div class="col-sm-7 table-detail-item-value">
				<a href="{{platformOrderInfo.payUrl }}" target="_blank">{{platformOrderInfo.payUrl }}</a>
				</div>
		</div>
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">商户订单号:</div>
				<div class="col-sm-7 table-detail-item-value">{{platformOrderInfo.payInfo.orderNo }}</div>
		</div>	
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">异步通知地址:</div>
				<div class="col-sm-7 table-detail-item-value">{{platformOrderInfo.payInfo.notifyUrl }}</div>
		</div>	
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">同步通知地址:</div>
				<div class="col-sm-7 table-detail-item-value">{{platformOrderInfo.payInfo.returnUrl }}</div>
		</div>	
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">附加信息:</div>
				<div class="col-sm-7 table-detail-item-value">{{platformOrderInfo.payInfo.attch }}</div>
		</div>	
		<div class="row">
				<div class="col-sm-5 table-detail-item-label">通知时间:</div>
				<div class="col-sm-7 table-detail-item-value">{{platformOrderInfo.payInfo.noticeTime }}</div>
		</div>
	</div>
</script>
<style type="text/css">
.common-query-cond-form {
	padding-top: 2px;
	padding-bottom: 2px;
}
</style>
</head>

<body>
	<div th:replace="common/header::html"></div>
	<div id="platform-order" v-cloak>
		<form class="form-inline common-query-cond-form">
			<div class="form-group common-query-cond">
				<label>订单号:</label><input type="text" class="form-control-sm" v-model="orderNo">
			</div>
			<div class="form-group common-query-cond">
				<label>商户:</label> <input type="text" class="form-control-sm" v-model="platformName">
			</div>
			<div class="form-group common-query-cond">
				<label>订单状态:</label> <select class="form-control-sm" v-model="orderState">
					<option value="">全部</option>
					<option v-for="dictItem in platformOrderStateDictItems" :value="dictItem.dictItemCode">{{dictItem.dictItemName}}</option>
				</select>
			</div>
			<div class="form-group common-query-cond">
				<label>收款渠道:</label> <select class="form-control-sm" v-model="gatheringChannelCode">
					<option value="">请选择</option>
					<option v-for="dictItem in gatheringChannelDictItems" :value="dictItem.dictItemCode">{{dictItem.dictItemName}}</option>
				</select>
			</div>
		</form>
		<form class="form-inline common-query-cond-form">
			<div class="form-group common-query-cond">
				<label>接单人:</label> <input type="text" class="form-control-sm" v-model="receiverUserName">
			</div>
			<div class="form-group common-query-cond">
				<label>提交时间:</label><input type="date" class="form-control-sm" v-model="submitStartTime"><span>到</span><input type="date" class="form-control-sm" v-model="submitEndTime">
			</div>
			<button type="button" class="btn btn-danger btn-sm" v-on:click="refreshTable">搜索</button>
		</form>
		<table class="common-table platform-order-table"></table>

		<div v-if="auditPlatformOrderFlag">
			<div class="modal-mask">
				<div class="modal-wrapper">
					<div class="modal-dialog">
						<div class="modal-content">
							<div class="modal-header">
								<h5 class="modal-title">审核订单</h5>
								<button type="button" class="close" data-dismiss="modal" aria-label="Close" v-on:click="auditPlatformOrderFlag = false">
									<span aria-hidden="true">&times;</span>
								</button>
							</div>
							<div class="modal-body">
								<form>
									<div class="form-group row">
										<div class="col-sm-6">
											<label>订单号:</label> <input type="text" class="form-control" v-model="auditPlatformOrder.orderNo" disabled="disabled">
										</div>
										<div class="col-sm-6">
											<label>接单人:</label> <input type="text" class="form-control" v-model="auditPlatformOrder.receiverUserName" disabled="disabled">
										</div>
									</div>
									<div class="form-group row">
										<div class="col-sm-6">
											<label>收款渠道:</label> <input type="text" class="form-control" v-model="auditPlatformOrder.gatheringChannelName" disabled="disabled">
										</div>
										<div class="col-sm-6">
											<label>收款金额:</label> <input type="text" class="form-control" v-model="auditPlatformOrder.gatheringAmount" disabled="disabled">
										</div>
									</div>
									<div class="form-group row">
										<div class="col-sm-12">
											<label>备注:</label>
											<textarea class="form-control" rows="3" cols="" v-model="auditNote"></textarea>
										</div>
									</div>
								</form>
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-success btn-sm" v-on:click="audit(1)">确认已支付</button>
								<button type="button" class="btn btn-sm" v-on:click="audit(2)">未支付取消订单</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div v-if="auditPlatformOrderFlag">
			<div class="modal-mask">
				<div class="modal-wrapper">
					<div class="modal-dialog">
						<div class="modal-content">
							<div class="modal-header">
								<h5 class="modal-title">审核订单</h5>
								<button type="button" class="close" data-dismiss="modal" aria-label="Close" v-on:click="auditPlatformOrderFlag = false">
									<span aria-hidden="true">&times;</span>
								</button>
							</div>
							<div class="modal-body">
								<form>
									<div class="form-group row">
										<div class="col-sm-6">
											<label>订单号:</label> <input type="text" class="form-control" v-model="auditPlatformOrder.orderNo" disabled="disabled">
										</div>
										<div class="col-sm-6">
											<label>接单人:</label> <input type="text" class="form-control" v-model="auditPlatformOrder.receiverUserName" disabled="disabled">
										</div>
									</div>
									<div class="form-group row">
										<div class="col-sm-6">
											<label>收款渠道:</label> <input type="text" class="form-control" v-model="auditPlatformOrder.gatheringChannelName" disabled="disabled">
										</div>
										<div class="col-sm-6">
											<label>收款金额:</label> <input type="text" class="form-control" v-model="auditPlatformOrder.gatheringAmount" disabled="disabled">
										</div>
									</div>
									<div class="form-group row">
										<div class="col-sm-12">
											<label>备注:</label>
											<textarea class="form-control" rows="3" cols="" v-model="auditNote"></textarea>
										</div>
									</div>
								</form>
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-success btn-sm" v-on:click="audit(1)">确认已支付</button>
								<button type="button" class="btn btn-sm" v-on:click="audit(2)">未支付取消订单</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script src="/js/platform-order.js"></script>
</body>
</html>