123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- {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="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">服务开始时间 <span class="text-danger">*</span></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="number" 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="form-group">
- <label class="col-sm-2 control-label">科室/部门 <span class="text-danger">*</span></label>
- <div class="col-sm-7">
- <select name="depId" class="form-control">
- <option value="">选择科室/部门</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">陪护服务<span class="text-danger">*</span></label>
- <div class="col-sm-7">
- <select name="cateId" class="form-control" onchange="changeService(this)">
- <option value="">选择服务</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="number" 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="preMoney" value="{$info.pre_money|default=''}">-->
- <!-- </div>-->
- <!-- </div>-->
- <div class="form-group">
- <label class="col-sm-2 control-label">执行护工</label>
- <div class="col-sm-7">
- {:widget('common/multiselect',['name'=>'uids','lists' => $workers, 'val' => []])}
- </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" 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: '#start',
- //设置开始日期、日期日期的 input 选择器
- //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
- type: 'datetime',
- trigger: 'click',
- theme: '#284a94'
- });
- 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);
- }
- </script>
- {/block}
|