<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>私塾家</title>
<script th:include="sys/common/metaCSS" th:remove="tag"></script> 
<script th:include="sys/common/metaJS" th:remove="tag"></script> 
<script src="sys/js/My97DatePicker/WdatePicker.js" th:src="@{/static/sys/js/My97DatePicker/WdatePicker.js}"></script>
</head>
<style>
	.tablelink{margin-right:10px;}
	.stylecss{
	      color: red;
	}
	.select_width{
	     width: 220px;
	}
	.date_width{
	     width: 150px;
	}
	
	.tablelist th,td{
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
	}
	#mealServiceAdd .zwfb_shop_table {
		margin-top: 10px
	}
	#mealServiceAdd tbody {
	    display: table-row-group;
	    vertical-align: middle;
    	border-color: inherit;
	}
	#mealServiceAdd .fwmc_xxk {
	    overflow: hidden;
	    margin-left: 20px;
	}
	#mealServiceAdd .fwmc_xxk li {
	    float: left;
	    width: 150px;
	    height: 52px;
	    border: 1px solid #ddd;
	    font-size: 18px;
	    color: #666;
	    margin-right: 30px;
	    text-align: center;
	    margin-bottom: 10px;
	    overflow: hidden;
	    cursor: pointer;
	}
	#mealServiceAdd .fwmc_xxk li p {
	    line-height: 18px;
	    font-size: 12px;
	    color: #999;
	    margin-top: 5px;
	}
	#mealServiceAdd .zwsl_num {
	    margin-left: 20px;
	    font-size: 16px;
	    color: #333;
	}
	#mealServiceAdd .zwsl_num span {
	    color: #999;
	    font-size: 12px;
	    padding-left: 10px;
	}
	#mealServiceAdd .nmb_jj {
	    overflow: hidden;
	    margin-left: 20px;
	}
	#mealServiceAdd .nmb_jj li.jian {
	    border-right: none;
	    cursor: pointer;
	    color: #999;
	    width: 30px;
	    padding: 0;
	}
	#mealServiceAdd .nmb_jj li {
	    float: left;
	    text-align: center;
	    line-height: 30px;
	    border: 1px solid #ddd;
	    font-size: 20px;
	    padding: 0 8px;
	}
	#mealServiceAdd .nmb_jj li .srkk {
	    width: 30px;
	    font-size: 16px;
	    border: none;
	    line-height: 30px;
	    text-align: center;
	    outline: 0;
	    background: #FFF;
	}
	#mealServiceAdd .nmb_jj li.jia {
	    border-left: none;
	    cursor: pointer;
	    color: #999;
	    width: 30px;
	    padding: 0;
	}
	#mealServiceAdd a.ty_but {
	    width: 130px;
	    height: 40px;
	    line-height: 40px;
	    text-align: center;
	    display: block;
	    font-size: 16px;
	    color: #fff;
	    border-radius: 3px;
	    background: #169ed8;
	}
	#mealServiceAdd a.ty_but:hover {
	    background: #1187ba;
	}
	#mealServiceAdd .fwmc_xxk li.sign_type_select_on {
	    background: url(/static/sys/images/fwkk.jpg) no-repeat center;
	    color: #169ed8;
	    border: 1px solid #169ed8;
	}
	
	
	
	
	
	
	#libServiceAdd .zwfb_shop_table {
		margin-top: 10px
	}
	#libServiceAdd tbody {
	    display: table-row-group;
	    vertical-align: middle;
    	border-color: inherit;
	}
	#libServiceAdd .fwmc_xxk {
	    overflow: hidden;
	    margin-left: 20px;
	}
	#libServiceAdd .fwmc_xxk li {
	    float: left;
	    width: 150px;
	    height: 52px;
	    border: 1px solid #ddd;
	    font-size: 18px;
	    color: #666;
	    margin-right: 30px;
	    text-align: center;
	    margin-bottom: 25px;
	    overflow: hidden;
	    cursor: pointer;
	}
	#libServiceAdd .fwmc_xxk li p {
	    line-height: 18px;
	    font-size: 12px;
	    color: #999;
	    margin-top: 5px;
	}
	#libServiceAdd .zwsl_num {
	    margin-left: 20px;
	    font-size: 16px;
	    color: #333;
	}
	#libServiceAdd .zwsl_num span {
	    color: #999;
	    font-size: 12px;
	    padding-left: 10px;
	}
	#libServiceAdd .nmb_jj {
	    overflow: hidden;
	    margin-left: 20px;
	}
	#libServiceAdd .nmb_jj li.jian {
	    border-right: none;
	    cursor: pointer;
	    color: #999;
	    width: 30px;
	    padding: 0;
	}
	#libServiceAdd .nmb_jj li {
	    float: left;
	    text-align: center;
	    line-height: 30px;
	    border: 1px solid #ddd;
	    font-size: 20px;
	    padding: 0 8px;
	}
	#libServiceAdd .nmb_jj li .srkk {
	    width: 30px;
	    font-size: 16px;
	    border: none;
	    line-height: 30px;
	    text-align: center;
	    outline: 0;
	    background: #FFF;
	}
	#libServiceAdd .nmb_jj li.jia {
	    border-left: none;
	    cursor: pointer;
	    color: #999;
	    width: 30px;
	    padding: 0;
	}
	#libServiceAdd a.ty_but {
	    width: 130px;
	    height: 40px;
	    line-height: 40px;
	    text-align: center;
	    display: block;
	    font-size: 16px;
	    color: #fff;
	    border-radius: 3px;
	    background: #169ed8;
	}
	#libServiceAdd a.ty_but:hover {
	    background: #1187ba;
	}
	#libServiceAdd .fwmc_xxk li.sign_type_select_on {
	    background: url(/static/sys/images/fwkk.jpg) no-repeat center;
	    color: #169ed8;
	    border: 1px solid #169ed8;
	}
	
	
	
</style>
<body style="min-width: 100%;">

<div class="rightinfo">
	<div class="formbody" id="libServiceAdd" >
		<input type="hidden" id="id" th:value="${merchant.id}" >
		<table border="0" cellspacing="0" cellpadding="0" class="zwfb_shop_table">
		     <tbody>
		      	<tr valign="top">
			        <td align="right" width="70" style="line-height: 50px;font-weight: 700">购买类型：</td>
			        <td>
			        	<ul class="fwmc_xxk">
				            <li class="sign_type_select sign_type_select_on" >
				              <p>平台管理费</p>
				              *<i>/</i>
				           	</li>
			          </ul>
			        </td>
		      	</tr>
		      <tr>
		        <td height="20"></td>
		        <td></td>
		      </tr>
		      
		     <tr valign="top">
	  			<td align="right" width="70" style="line-height: 30px;font-weight: 700">费用金额：</td>
	  	        <td>
		        	<ul class="nmb_jj">
			            <li>
			              <input name="price" id="price" type="text" th:value="${merchant.outPrice!=null ? merchant.outPrice : '0' }" class="srkk" style="width: 115px;"><i> 元</i>
			            </li>
		          </ul>
		        </td>
		      </tr>
		   	 <tr>
		        <td height="20"></td>
		        <td></td>
		      </tr>
		   	 <tr>
		        <td height="20"></td>
		        <td></td>
		      </tr>
		      <tr>
		        <td></td>
		        <td><a style="margin-left: 20px;" class="ty_but ml20" href="javascript:#" onclick="save();">购 买</a></td>
		      </tr>
		    </tbody>
	   	</table>
	</div>
<br/>
<br/>
	
<table class="tablelist">
	<thead>
	    <tr>
	    	<th >订单号</th>
	    	<th >管理金额</th>
	    	<th >购买时间</th>
	    </tr> 
	</thead>
	<tbody>
		 <tr th:each="item:${list}" >
		 	<td th:text="${item.id}"></td>
	    	<td th:text="${item.price}"></td>
	    	<td th:text="${item.createTime}"></td>
	    </tr> 
	   
	</tbody>
</table> 

</body>
<script type="text/javascript">
	var islock=false;
	function save(){
		if(islock){
			parent.layer.msg("正在下单中，请勿重复提交...",{icon:2});
		}
		parent.layer.confirm("确定为此商户购买管理费？", {
			icon: 4, btn: ['确定','关闭'],offset: '100px' //按钮
		}, function(){
				islock=true;
				var id=$("#id").val();
				var price=$("#price").val();
				
				var url="[[${sysUrl}]]/sys/fx/saveMerchantPlat";
				var params ={
			        'id' : id,
			        'price':price,
			    };
				$.post(url,params,function(data){
					if(data.meta.success){
						parent.layer.msg("购买成功",{icon:1});
						parent.location.reload();
						parent.layer.close(parent.layer.getFrameIndex(window.name));
						islock=false;
					}else{
						parent.layer.msg(data.meta.message,{icon:11});
						islock=false;
					}
				});
		});
	}
		
</script>

</html>