123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- {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="javascript:;" onclick="window.history.back()">
- 返回上一页
- </a>
- </div>
- </div>
- <div class="ibox-content">
- <form method="post" action="{:url('edit')}" class="form-horizontal">
- <input type="hidden" name="id" value="{$info['id']|default='0'}">
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">联系人 <span class="text-danger">*</span></label>
- <div class="col-xs-9">
- <input type="text" class="form-control" name="contact" value="{$info.contact|default=''}">
- </div>
- </div>
- </div>
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">联系手机号 <span class="text-danger">*</span></label>
- <div class="col-xs-9">
- <input type="text" class="form-control" name="phone" value="{$info.phone|default=''}">
- </div>
- </div>
- </div>
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">病人姓名</label>
- <div class="col-xs-9">
- <input type="text" class="form-control" name="name" value="{$info.name|default=''}">
- </div>
- </div>
- </div>
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">性别</label>
- <div class="col-xs-9">
- <select name="gender" class="form-control">
- <option value="1">男</option>
- <option value="2">女</option>
- </select>
- </div>
- </div>
- </div>
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">年龄</label>
- <div class="col-xs-9">
- <input type="text" class="form-control" name="age" value="{$info.age|default=''}">
- </div>
- </div>
- </div>
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">床号</label>
- <div class="col-xs-9">
- <input type="text" class="form-control" name="bed" value="{$info.bed|default=''}">
- </div>
- </div>
- </div>
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">所患疾病</label>
- <div class="col-xs-9">
- <input type="text" class="form-control" name="ill" value="{$info.ill|default=''}">
- </div>
- </div>
- </div>
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">订单金额</label>
- <div class="col-xs-9">
- <input type="text" class="form-control" name="amount" value="{$info.amount|default=''}">
- </div>
- </div>
- </div>
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">开始时间</label>
- <div class="col-xs-9">
- <input type="text" class="form-control" readonly id="start" name="start" value="{$info.start|default=''}">
- </div>
- </div>
- </div>
- <div class="col-xs-6">
- <div class="form-group">
- <label class="col-xs-3 control-label">结束时间</label>
- <div class="col-xs-9">
- <input type="text" class="form-control" readonly id="end" name="end" value="{$info.end|default=''}">
- </div>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">科室/部门</label>
- <div class="col-sm-7">
- <select name="dep_id" class="form-control">
- <option value="0">选择科室/部门</option>
- {volist name="dep" id="v"}
- <option value="{$v.id}">{$v.title}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">陪护服务</label>
- <div class="col-sm-7">
- <select name="cate_id" class="form-control" onchange="changeService(this)">
- <option value="0">选择服务</option>
- {volist name="cate" id="v"}
- <option value="{$v.id}">{$v.title}</option>
- {/volist}
- </select>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">价格(/人/天)</label>
- <div class="col-sm-7">
- <input type="text" class="form-control" id="price" name="price" value="{$info.price|default=''}">
- </div>
- </div>
- <!-- <div class="form-group">-->
- <!-- <label class="col-sm-2 control-label">预收金</label>-->
- <!-- <div class="col-sm-7">-->
- <!-- <input type="number" class="form-control" name="pre_money" value="{$info.pre_money|default=''}">-->
- <!-- </div>-->
- <!-- </div>-->
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-4 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 type="text/javascript" src="/static/layDate-v5.0.9/laydate.js"></script>
- <script>
- laydate.render({
- elem: '#start',
- //设置开始日期、日期日期的 input 选择器
- //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- type: 'datetime',
- trigger: 'click',
- theme: '#148d8f'
- });
- laydate.render({
- elem: '#end',
- //设置开始日期、日期日期的 input 选择器
- //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- type: 'datetime',
- trigger: 'click',
- theme: '#148d8f'
- });
- var cates = JSON.parse('{:json_encode($cate)}');
- function changeService(_self) {
- console.log(cates);
- var cateId = $(_self).val();
- var price = '';
- console.log(cateId);
- for (let o in cates){
- if(cates[o].id == cateId){
- price = cates[o].price;
- break;
- }
- }
- console.log(price);
- $('#price').val(price);
- }
- $(document).ready(function(){
- formSetValue("cate_id", {$info.cate_id|default=0});
- formSetValue("dep_id", {$info.dep_id|default=0});
- });
- </script>
- {/block}
|