123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- {extend name="common/common2" /}
- {block name="main"}
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <!--<div class="ibox-title">-->
- <!--<h5>{$meta_title}</h5>-->
- <!--<div class="ibox-tools">-->
- <!--<a class="toback" href="{:url('index')}">-->
- <!--返回上一页-->
- <!--</a>-->
- <!--</div>-->
- <!--</div>-->
- <div class="ibox-content">
- <form method="post" action="{:url('add')}" class="form-horizontal">
- <input type="hidden" name="id" value="{$info['id']|default='0'}">
- <div class="form-group">
- <label class="col-sm-2 control-label">设备名称<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">设备编号</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="sn" value="{$info.sn|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">设备型号</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="spec" value="{$info.spec|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">服务区域</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="area" value="{$info.area|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">生产厂家</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="producer" value="{$info.producer|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">设备图片<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- {:widget_view('common/upimg',['name'=>'imgs','multi'=>1,'val'=>isset($info)?$info['imgs']:''])}
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">维保项<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- {:widget_view('common/select3',['title'=>'类型','name'=>'cate_id','name1'=>'device_form','lists'=>$cate,'options1' =>isset($device_form)?$device_form:[],'value' =>isset($info)?$info['cate_id']:'','url'=>url('getByCate'), 'value1' =>isset($info)?$info['device_form']:[]])}
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">设备详情<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <textarea name="content" class="form-control" cols="30" rows="3" value="{$info.content|default=''}" id="value"></textarea>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">维修人员<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- {:widget_view('common/multiselect',['name'=>'device_user','lists' =>$device_user, 'val' =>isset($info)?$info['user']:[]])}
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">状态</label>
- <div class="col-sm-6">
- <label class="cr-inline">
- <input type="radio" value="1" name="enable">正常
- </label>
- <label class="cr-inline">
- <input type="radio" value="0" name="enable">禁用
- </label>
- </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("enable", {$info.enable|default=1});
- });
- var val=$('#value').attr('value');
- document.getElementById("value").value=val;
- </script>
- {/block}
|