<!DOCTYPE html>
<html lang=zh-cn>
<head>
	<meta charset=utf-8>
	<title>纵横计量支付系统</title>
	<meta name=description content=计量支付>
	<meta name=copyright content=smartcost.com.cn>
	<link rel=stylesheet href={{rootUrl}}global/css/bootstrap.css>
	<link rel=stylesheet href={{rootUrl}}global/css/style.css>
	<script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
	<script src={{rootUrl}}global/js/bootstrap.js></script>
	<script src={{rootUrl}}global/js/jl.js></script>
</head>
<body>
<div class="wrapHeader">
	<h1 class="mainLogo" title="纵横计量支付"></h1>
	<div class="sysTools"><a title="返回首页" href="index.html"><i class="icon-circle-arrow-left icon-white"></i></a>&nbsp;&nbsp;&nbsp;<a
			title="纵横官网" target="_blank" href="http://smartcost.com.cn"><i class="icon-home icon-white"></i></a></div>
</div>
<!-- include "top" -->
<div class="warpAdmin">
	<!-- include "menu" -->
	<div class="adminMain">
		<form class="form-horizontal">
			<fieldset>
				<legend>在线签署</legend>
				<!--软件生成报表-->
				<div class="form-group">
					<label class="col-sm-2 control-label">软件生成报表</label>
					<div class="col-sm-3">
						<!-- if {{reportSwitch}} == 0 -->
						<div class="btn-group">
							<button class="btn btn-default" data-status="open_report" title="开启在线签署">开启</button>
							<button class="btn btn-danger disabled" data-status="close_report" disabled="disabled">已关闭</button>
						</div>
						<!-- else -->
						<div class="btn-group">
							<button class="btn btn-success  disabled" data-status="open_report"  disabled="disabled">已开启</button>
							<button class="btn btn-default" data-status="close_report" title="开启在线">关闭</button>
						</div>
						<!-- endif -->
						<a data-toggle="modal" href="#help1">帮助</a>
					</div>
				</div>

				<!--WEB开启在线签署-->
				<div class="form-group">
					<label class="col-sm-2 control-label">WEB开启在线签署</label>
					<div class="col-sm-3">
						<!-- if {{signSwitch}} == 0 -->
						<div class="btn-group">
							<button class="btn btn-default" data-status="open_sign" title="开启在线签署">开启</button>
							<button class="btn btn-danger disabled" data-status="close_sign" disabled="disabled">已关闭</button>
						</div>
						<!-- else -->
						<div class="btn-group">
							<button class="btn btn-success disabled" data-status="open_sign"  disabled="disabled">已开启</button>
							<button class="btn btn-default" data-status="close_sign" title="开启在线">关闭</button>
						</div>
						<!-- endif -->
						<a data-toggle="modal" href="#help2">帮助</a>
					</div>
				</div>
				<!--要先开启 “WEB开启在线签署”-->
				<div class="form-group" id="launchsign" <!-- if {{signSwitch}} == 0 -->style="display:none"<!-- endif -->>
					<label class="col-sm-2 control-label">WEB开启发起签署</label>
					<div class="col-sm-3">
						<!-- if {{launchsignSwitch}} == 0 -->
						<div class="btn-group">
							<button class="btn btn-default" data-status="open_launch" title="开启在线签署">开启</button>
							<button class="btn btn-danger disabled" data-status="close_launch" disabled="disabled">已关闭</button>
						</div>
						<!-- else -->
						<div class="btn-group">
							<button class="btn btn-success disabled" data-status="open_launch"  disabled="disabled">已开启</button>
							<button class="btn btn-default" data-status="close_launch" title="开启在线">关闭</button>
						</div>
						<!-- endif -->
						<a data-toggle="modal" href="#help3">帮助</a>
					</div>
				</div>
			</fieldset>
		</form>
	</div>
</div>
</div>
<!-- 帮助1弹出 -->
<div id="help1" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-body">
				<div class="alert alert-info">
					此开关用于开启关闭软件功能入口
				</div>
				<div>
					<img src="{{rootUrl}}global/images/sign-help1.png">
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div>
<!-- 帮助2弹出 -->
<div id="help2" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-body">
				<div class="alert alert-info">
					此开关用于开启关闭WEB功能入口
				</div>
				<div>
					<img src="{{rootUrl}}global/images/sign-help2.png">
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div>
<!-- 帮助3弹出 -->
<div id="help3" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-body">
				<div class="alert alert-info">
					此开关用于开启关闭发起签署按钮，如果你想关闭在线签署功能，又希望可以查看历史数据，可以开启本项，关闭“软件生成报表”和“WEB开启在线签署。
					”
				</div>
				<div>
					<img src="{{rootUrl}}global/images/sign-help3.png">
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">autoFlashHeight();</script>
<script>
	$(function(){
		$('.form-group .btn').on('click',function(){
			var status = $(this).attr('data-status').split("_");
			if(!$(this).hasClass('disabled')){
				if(status[0] == 'open'){
					$(this).addClass('btn-success').removeClass('btn-default').text('已开启');
					$(this).siblings('button').removeClass('btn-danger').addClass('btn-default').text('关闭');
					if(status[1] == 'sign'){
						$('#launchsign').show();
					}
				}else{
					$(this).addClass('btn-danger').removeClass('btn-default').text('已关闭');
					$(this).siblings('button').addClass('btn-default').removeClass('btn-success').text('开启');
					if(status[1] == 'sign'){
						$('#launchsign').hide();
					}
				}
				$(this).addClass('disabled').attr('disabled', true);
				$(this).siblings('button').removeClass('disabled').attr('disabled',false);
			}
			$.ajax({
				type: 'post',
				url: '/manage/sys/sign/switch',
				data:{status:status[0], type:status[1]},
				dataType: 'json',
				success: function(result){

				}
			});
			return false;
		})
	})
</script>
</body>