<?php require '/weixin/OAuth2.php';?>
|
<?php require '/inc/function.php';?>
|
<?php
|
$WEB_Name="新建优惠券";
|
?>
|
<!DOCTYPE html>
|
<html>
|
|
<head>
|
<?php require '/inc/New_ccs.php';?>
|
<title><?php echo $WEB_Name;?></title>
|
|
<!--Begin Page Level CSS -->
|
<link href="/css/assets/plugins/morris-chart/morris.css" rel="stylesheet">
|
<link href="/css/assets/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet"/>
|
<!--End Page Level CSS -->
|
|
<!-- BEGIN PAGE LEVEL STYLES -->
|
<link href="/css/assets/plugins/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">
|
<link href="/css/assets/plugins/dropzone/dropzone.css" rel="stylesheet" type="text/css" />
|
<link href="/css/assets/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet">
|
<!-- END PAGE LEVEL STYLES -->
|
</head>
|
<?php
|
$memu='CouponAdmin';
|
?>
|
<body class="sticky-header">
|
<!--Start left side Menu-->
|
<?php require 'New_menu_left.php';?>
|
<!--End left side menu-->
|
|
<!-- main content start-->
|
<div class="main-content" >
|
|
<!-- header section start-->
|
<?php require 'New_menu_header.php';?>
|
<!-- header section end-->
|
|
|
<!--body wrapper start-->
|
<div class="wrapper">
|
|
<!--Start Page Title-->
|
<div class="page-title-box">
|
<h4 class="page-title"></h4>
|
<ol class="breadcrumb">
|
<li>
|
<a href="CouponAdminList.php">优惠券</a>
|
</li>
|
<li>
|
<a href="CouponAdminApp.php">新建优惠券</a>
|
</li>
|
</ol>
|
<div class="clearfix"></div>
|
</div>
|
<!--End Page Title-->
|
|
<!--Start row-->
|
<div class="row">
|
<div class="col-md-12">
|
<div class="white-box">
|
<h2 class="header-title">优惠券信息
|
|
<form class="js-validation-bootstrap form-horizontal" action="#" name="ServiceOrdForm" method="post">
|
<input type="hidden" name="UnitIntroducerID" id="UnitIntroducerID" value="">
|
|
<div class="form-group">
|
<label class="col-md-2 control-label" for="PtName">优惠券名称 <span class="text-danger">*</span></label>
|
<div class="col-md-3">
|
<input class="form-control" name="CouponName" id="CouponName" value="" placeholder="请输入优惠券名称" type="text">
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-md-2 control-label" for="PtName">优惠券金额 <span class="text-danger">*</span></label>
|
<div class="col-md-3">
|
<input class="form-control" name="CouponMoney" id="CouponMoney" value="" placeholder="请输入优惠券金额" type="number">
|
</div>
|
</div>
|
|
|
<div class="form-group">
|
<label class="col-md-2 control-label">优惠券有效期 <span class="text-danger">*</span></label>
|
<div class="col-md-3">
|
<input type="text" name="CouponDate_Ent" class="form-control" placeholder="mm/dd/yyyy" value="<?php echo date("Y-m-t",strtotime("+6 month"));?>" id="CouponDate_Ent">
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-md-2 control-label">生成数量 <span class="text-danger">*</span></label>
|
<div class="col-md-3">
|
<input class="form-control" name="CouponInt" id="CouponInt" value="1" type="number">
|
</div>
|
</div>
|
|
<div class="form-group">
|
<label class="col-md-2 control-label" for="PtName">优惠券使用说明</label>
|
<div class="col-md-3">
|
<input class="form-control" name="CouponExplain" id="CouponExplain" value="" placeholder="请输入优惠券使用说明(选填)" type="text">
|
</div>
|
</div>
|
|
<div class="form-group m-b-0">
|
<div class="col-sm-offset-3 col-sm-9">
|
<button type="button" id="CouponApp" class="btn btn-primary">新建优惠券</button>
|
|
</div>
|
</div>
|
</form>
|
|
|
</div>
|
</div>
|
</div>
|
<!--End row-->
|
|
|
</div>
|
<!-- End Wrapper-->
|
|
</div>
|
<!--End main content -->
|
|
<?php require 'New_vicgame.php';?>
|
<!-- BEGIN PAGE LEVEL SCRIPTS -->
|
<script src="/css/assets/plugins/jquery-validation/jquery.validate.min.js"></script>
|
<script src="/css/assets/plugins/sweetalert/sweet-alert.js"></script>
|
<script src="/css/assets/plugins/dropzone/dz.js"></script>
|
|
<script src="/css/assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
|
<script src="/css/assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.zh-CN.js"></script>
|
|
<script>
|
// Date Picker
|
jQuery('#CouponDate_Ent').datepicker({
|
format: "yyyy-mm-dd",
|
language: "zh-CN",
|
autoclose: true,
|
todayHighlight: true
|
});
|
</script>
|
<!-- BEGIN PAGE LEVEL SCRIPTS -->
|
|
<script>
|
|
// Initialize when page loads
|
|
//--按钮操作--BEGIN
|
//新建任务单
|
//var CouponApp = function(){
|
$('#CouponApp').click(function(){
|
swal({
|
title: "确定新建优惠券?",
|
text: "",
|
type: "warning",
|
showCancelButton: true,
|
confirmButtonColor: "#DD6B55",
|
cancelButtonText: "取消",
|
confirmButtonText: "确认",
|
closeOnConfirm: false
|
}, function(){
|
$.ajax({
|
type: "POST",
|
url: "admin_save_ajax.php",//需要跳转到的界面 the page you want to post data
|
data: {
|
//要传给后台的数据 the data you should send to background
|
admin_save:1,
|
CouponName:$('#CouponName').val(),
|
CouponMoney:$('#CouponMoney').val(),
|
CouponDate_Ent:$('#CouponDate_Ent').val(),
|
CouponExplain:$('#CouponExplain').val(),
|
CouponInt:$('#CouponInt').val()
|
},
|
dataType:'json',
|
beforeSend: function() {},//在发送之前你可以进行相关操作 what you want to do before send
|
success: function(data) {
|
console.log(data);
|
if (data!='')
|
{
|
if (data.result==1)
|
{
|
swal({
|
title : "新建成功",
|
text : "",
|
type : "success",
|
}, function() {
|
window.location.href="CouponAdminList.php";
|
});
|
}else{
|
swal("保存失败", data.errcode, "error");
|
}
|
}else{swal("操作失败", "网络通信失败,请重试", "error");}
|
}
|
})
|
});
|
});
|
|
|
//--按钮操作--End
|
|
</script>
|
</body>
|
|
</html>
|