123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- {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>编辑</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="spec" value="{$info.spec|default=''}">
- </div>
- </div>
- <div class="form-group" id="vueapp">
- <label class="col-sm-2 control-label">分类<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <input type="hidden" name="cate_id" id="cateId" value="{$info['cate_id']|default=''}">
- <el-cascader
- style="width: 100%"
- v-model="cateId"
- :options="list"
- :props="{ checkStrictly: true }"
- clearable>
- </el-cascader>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">类别<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <select name="class_id" class="form-control">
- <option value="">选择类别</option>
- {volist name="class" id="v"}
- <option value="{$v.id}">{$v.title}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">增加方式<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <select name="add_id" class="form-control">
- <option value="">选择增加方式</option>
- {volist name="add" id="v"}
- <option value="{$v.id}">{$v.title}</option>
- {/volist}
- </select>
- </div>
- </div>
- <input type="hidden" class="form-control" name="nums" value="{$info.nums|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="unit_id" class="form-control">
- <option value="">选择单位</option>
- {volist name="unit" id="v"}
- <option value="{$v.id}">{$v.title}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">原值<span class="text-danger">*</span></label>
- <div class="col-sm-6">
- <input type="number" class="form-control" name="price" value="{$info.price|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="brand" value="{$info.brand|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">
- <input class="form-control" id="buyTime" readonly placeholder="开始时间" name="buy_time" value="{$info['buy_time']|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="address" value="{$info.address|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="used" value="{$info.used|default=''}">
- </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="print">是
- </label>
- <label class="cr-inline">
- <input type="radio" value="0" name="print">否
- </label>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">备注1</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="remark" value="{$info.remark|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">备注2</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="remark2" value="{$info.remark2|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">备注3</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="remark3" value="{$info.remark3|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">备注4</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="remark4" value="{$info.remark4|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">备注5</label>
- <div class="col-sm-6">
- <input type="text" class="form-control" name="remark5" value="{$info.remark5|default=''}">
- </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" target-form="form-horizontal" type="submit">确 定</button>
- <a href="{:url('index')}" class="btn btn-default">取 消</a>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script src="/static/layDate-v5.0.9/laydate.js"></script>
- <script>
- laydate.render({
- elem: '#buyTime',
- trigger: 'click' ,
- theme: '#f99c34'
- });
- $(document).ready(function(){
- formSetValue("print", {$info.print|default=0});
- formSetValue("class_id", {$info.class_id|default=''});
- formSetValue("add_id", {$info.add_id|default=''});
- formSetValue("unit_id", {$info.unit_id|default=''});
- });
- var tree = {:json_encode($tree)};
- var info = {:json_encode($info)};
- new Vue({
- el: '#vueapp',
- data: function() {
- return {
- list :tree,
- cateId :info.cate_id,
- }
- },
- watch: {
- cateId: function (newtype, oldtype) {
- $('#cateId').val(newtype);
- },
- }
- })
- </script>
- {/block}
|