<!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">
<style type="text/css">
</style>
</head>

<body>
	<div th:replace="common/header::html"></div>
	<div id="platform" v-cloak>
		<form class="form-inline common-query-cond-form" action="#">
			<div class="form-group common-query-cond">
				<label>商户名称:</label><input type="text" class="form-control-sm" v-model="name">
			</div>
			<button type="button" class="btn btn-danger btn-sm" v-on:click="refreshTable">搜索</button>
		</form>
		<form class="form-inline common-query-cond-form float-right" action="#">
			<button type="button" class="btn btn-info btn-sm" v-on:click="openAddPlatformModal">新增商户</button>
		</form>
		<table class="common-table platform-table"></table>
		<div v-if="addOrUpdatePlatformFlag">
			<div class="modal-mask">
				<div class="modal-wrapper">
					<div class="modal-dialog">
						<div class="modal-content">
							<div class="modal-header">
								<h5 class="modal-title">{{platformActionTitle}}</h5>
								<button type="button" class="close" data-dismiss="modal" aria-label="Close" v-on:click="addOrUpdatePlatformFlag = false">
									<span aria-hidden="true">&times;</span>
								</button>
							</div>
							<div class="modal-body">
								<form>
									<div class="form-group row">
										<div class="col-sm-12">
											<label>商户名称:</label> <input type="text" class="form-control" v-model="editPlatform.name">
										</div>
									</div>
									<div class="form-group row">
										<div class="col-sm-12">
											<label>接入密钥:</label> <input type="text" class="form-control" v-model="editPlatform.secretKey">
										</div>
									</div>
								</form>
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-success btn-sm" v-on:click="addOrUpdatePlatform">保存</button>
								<button type="button" class="btn btn-sm" v-on:click="addOrUpdatePlatformFlag = false">取消</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script src="/js/merchant.js"></script>
</body>
</html>