You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/frontend/views/work-day/edit.php

92 lines
3.8 KiB

5 years ago
<?php
use \common\libs\MyLib;
5 years ago
?>
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="/assets/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-content">
<div class="row">
<div class="col-md-12">
<form role="form" class="form-horizontal data-from" id="theFrm">
<input type="hidden" name="id" value="<?=intval($info->id)?>">
<div class="form-group">
5 years ago
<label class="col-sm-2 control-label">月份</label>
<div class="col-sm-3">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
5 years ago
<input type="text" id="date" name="date" class="form-control" autocomplete="off" value="<?=$info->date?>">
</div>
</div>
</div>
<div class="form-group">
5 years ago
<label class="col-sm-2 control-label">双休天数</label>
<div class="col-sm-3">
<input type="text" name="double_break" value="<?=$info->double_break?>" class="form-control">
</div>
5 years ago
<label class="col-sm-2 control-label">单休天数</label>
<div class="col-sm-3">
<input type="text" name="single_break" value="<?=$info->single_break?>" class="form-control">
</div>
</div>
<div>
<div class="row">
5 years ago
<div class="col-sm-5 col-sm-offset-5">
<button class="btn btn-primary btn-save" type="button">
<strong><?=$info ? '保 存':'添 加'?></strong>
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/datapicker/bootstrap-datepicker.js"></script>
5 years ago
<script src="/assets/js/plugins/layer/laydate/laydate.js"></script>
<script type="text/javascript" language="javascript">
$(function () {
5 years ago
// $('.input-group.date').datepicker({
// minViewMode: 1,
// keyboardNavigation: false,
// forceParse: false,
// autoclose: true,
// todayHighlight: true,
// format: "yyyy-mm"
// });
laydate({
elem:'#date',
format: 'YYYY-MM',
type:'month'
5 years ago
});
//提交按钮
$(".btn-save").click(function(){
parent.layer.confirm('是否确认提交?', {
btn: ['确认','取消'], //按钮
shade: false //不显示遮罩
}, function(){
var params = $("#theFrm").serialize();
$.post('/work-day/save',params,function(obj){
if(obj.success) {
parent.layer.msg('保存成功');
parent.refreshList();
layer_close();
} else {
parent.layer.msg(data.msg);
5 years ago
}
},'json');
}, function(){
//
});
5 years ago
});
})
</script>
<?php $this->endBlock('footer_js'); ?>