<div class="opwindow update_window">
	<div class="layui-form layui-row">
	<div class="layui-form-item">
			<div class="layui-col layui-col-md12">
				<label>商户名称：</label> <span id="merchant_name">{$value[merchant_name]}</span>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-col layui-col-md12">
				<label>商户PID：</label> <span id="merchant_pid">{$value[merchant_pid]}</span>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-col layui-col-md12">
				<label>签约状态：</label> <span id="order_status">{echo isset($this->OrderStatus[$value[order_status]]) ? $this->OrderStatus[$value[order_status]] : '未知'}</span>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-col layui-col-md12">
				<label>更新时间：</label> <span id="time_update">{echo gsdate('Y-m-d H:i:s', $value['time_update'])}</span>
			</div>
		</div>
		<div class="layui-form-item" id="reject_reason" style="<!--{if empty($value['reject_reason'])}-->display:none;<!--{/if}-->">
			<div class="layui-col layui-col-md12">
				<label>驳回原因：</label>
				<div id="reject_reason_detail">{$value[reject_reason]}</div>
			</div>
		</div>
		<div class="layui-form-item0">
			<div class="layui-col layui-col-md12" style="text-align:right;">
				<button type="button" id="cancel2" class="layui-btn">关闭</button>
				<!--{if in_array($value['order_status'], ['MERCHANT_AUDITING', 'MERCHANT_CONFIRM'])}-->
				<button type="button" id="refresh" class="layui-btn layui-btn-normal">刷新</button>
				<!--{/if}-->
				<!--{if in_array($value['order_status'], ['MERCHANT_CONFIRM_SUCCESS'])}-->
				<button type="button" id="set_auth" class="layui-btn layui-btn-danger">同步授权</button>
				<!--{/if}-->
			</div>
		</div>
	</div>
</div>
<style>
.update_window .layui-form-item #reject_reason_detail {padding-bottom:5px;}
.update_window .layui-form-item {padding-bottom:5px;border-bottom:1px solid #CCC;}
</style>
<script type="text/javascript">
var batch_no = "{$value[batch_no]}";
var id = "{echo input('param.id')}";
var merchant_id = "{echo input('param.merchant_id')}";
var index_update;
$(document).ready(function(){
	index_update = layer.index;
});
$("#cancel2").click(function(){
	layer.close(index_update);
});
$("#refresh").click(function(){
	showWindow("查看详情", "{echo \befen\get_url()}", "600px", "update_window");
});
$("#set_auth").click(function(){
	op("是否同步商户授权设置？", "{echo url('PayAlipay/set_auth_token', ['id' => input('param.id'), 'merchant_id' => input('param.merchant_id')])}");
});
</script>
