123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- {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('back')}">-->
- <!--返回上一页-->
- <!--</a>-->
- <!--</div>-->
- <!--</div>-->
- <div class="ibox-content">
- <form method="post" action="{:url('add')}" class="form-horizontal">
- <input type="hidden" name="type" value="2">
- <div class="form-group">
- <label class="col-sm-2 control-label">出库人<span class="text-danger">*</span></label>
- <div class="col-sm-8">
- <input type="text" class="form-control" name="name" value="{$info.title|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">联系电话<span class="text-danger">*</span></label>
- <div class="col-sm-8">
- <input type="text" class="form-control" name="phone" value="{$info.unit|default=''}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">备注</label>
- <div class="col-sm-8">
- <textarea name="remark" class="form-control" id="remark" cols="30" rows="5">{$info.remark|default=''}</textarea>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">选择物品<span class="text-danger">*</span></label>
- <div class="col-sm-8">
- <a url="{:url('CompanyGoods/selectGoods')}" href="javascript:;" data-title="选择物品" onclick="layer_open(this,0)" class="btn btn-primary">选择物品</a>
- <table class="table table-striped table-bordered">
- <thead>
- <tr>
- <th style="width: 120px">数量</th>
- <th>名称</th>
- <th>剩余数量</th>
- <th>品牌</th>
- <th>规格</th>
- <th>类型</th>
- <th>购买时间</th>
- </tr>
- </thead>
- <tbody class="layer-photos" id="layer-photos">
- </tbody>
- </table>
- </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_c="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 type="text/javascript" src="/static/layDate-v5.0.9/laydate.js"></script>
- <script>
- laydate.render({
- elem: '#buy_time',
- trigger: 'click' ,
- theme:'#148d8f'
- });
- $(document).ready(function(){
- formSetValue("enable", {$info.enable|default=1});
- localStorage.removeItem("mateapply");
- localStorage.removeItem("mateapplyids");
- });
- var lists = [];
- function formatList() {
- var str = '';
- let ids = [];
- for (let o in lists){
- ids.push(lists[o].id);
- str += '<tr>';
- str += '<td><input type="number" class="form-control input-sm" name="goods['+lists[o].id+'][nums]"></td>';
- str += '<td>'+lists[o].title+'</td>';
- str += '<td>'+lists[o].nums+'</td>';
- str += '<td>'+lists[o].brand+'</td>';
- str += '<td>'+lists[o].spec+'</td>';
- str += '<td>'+lists[o].type+'</td>';
- str += '<td>'+lists[o].buy_time+'</td>';
- str += '</tr>';
- }
- $('#layer-photos').html(str);
- if(ids.length > 0){
- localStorage.setItem("mateapply", JSON.stringify(lists));
- localStorage.setItem("mateapplyids", JSON.stringify(ids));
- }else{
- localStorage.removeItem("mateapply");
- localStorage.removeItem("mateapplyids");
- }
- console.log(keyword);
- }
- </script>
- {/block}
|