12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <form method="post" action="{:url('addGroupClass')}" class="form-horizontal">
- <input type="hidden" name="id" value="{$info['id']|default='0'}">
- <input type="hidden" name="day" value="{$day|default=''}">
- <input type="hidden" name="gid" value="{$gid|default=''}">
- <div class="form-group">
- <label class="col-sm-2 control-label">方式<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <select name="type" onchange="setTT(this.value)" class="form-control">
- <option value="1">班次排班</option>
- <option value="2">周期排班</option>
- </select>
- </div>
- </div>
- <div class="form-group" id="b1" {if isset($info) && $info.type==2} style="display: none" {/if}>
- <label class="col-sm-2 control-label">班次</label>
- <div class="col-sm-6">
- <select name="class_id" class="form-control">
- <option value="0">休息</option>
- {foreach $classList as $k=>$v}
- <option value="{$v.id}">{$v.name}</option>
- {/foreach}
- </select>
- </div>
- </div>
- <div class="form-group" id="b2" {if !isset($info) || (isset($info) && $info.type==1)} style="display: none" {/if}>
- <label class="col-sm-2 control-label">考勤周期</label>
- <div class="col-sm-6">
- <select name="week" class="form-control">
- <option value="0">休息</option>
- {if !empty($weekList['title'])}
- <option value="{$weekList.days}">{$weekList.title}</option>
- {/if}
- </select>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-6 col-sm-offset-2">
- <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
- <button class="btn cancel-btn btn-default" type="button">取 消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script>
- $(document).ready(function(){
- formSetValue("type", {$info.type|default=1});
- });
- function setTT(val) {
- if(val==1){
- $("#b1").css('display','block');
- $("#b2").css('display','none');
- }
- if(val==2){
- $("#b1").css('display','none');
- $("#b2").css('display','block');
- }
- }
- </script>
- {/block}
|