add.html 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <!--<div class="ibox-title">-->
  7. <!--<h5>{$meta_title}</h5>-->
  8. <!--<div class="ibox-tools">-->
  9. <!--<a class="toback" href="{:url('index')}">-->
  10. <!--返回上一页-->
  11. <!--</a>-->
  12. <!--</div>-->
  13. <!--</div>-->
  14. <div class="ibox-content">
  15. <form method="post" action="{:url('add')}" class="form-horizontal">
  16. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  17. <div class="col-xs-6">
  18. <div class="form-group">
  19. <label class="col-xs-3 control-label">联系人 <span class="text-danger">*</span></label>
  20. <div class="col-xs-9">
  21. <input type="text" class="form-control" name="contact" value="{$info.contact|default=''}">
  22. </div>
  23. </div>
  24. </div>
  25. <div class="col-xs-6">
  26. <div class="form-group">
  27. <label class="col-xs-3 control-label">联系手机号 <span class="text-danger">*</span></label>
  28. <div class="col-xs-9">
  29. <input type="text" class="form-control" name="phone" value="{$info.phone|default=''}">
  30. </div>
  31. </div>
  32. </div>
  33. <div class="col-xs-6">
  34. <div class="form-group">
  35. <label class="col-xs-3 control-label">病人姓名</label>
  36. <div class="col-xs-9">
  37. <input type="text" class="form-control" name="name" value="{$info.name|default=''}">
  38. </div>
  39. </div>
  40. </div>
  41. <div class="col-xs-6">
  42. <div class="form-group">
  43. <label class="col-xs-3 control-label">性别</label>
  44. <div class="col-xs-9">
  45. <select name="gender" class="form-control">
  46. <option value="1">男</option>
  47. <option value="2">女</option>
  48. </select>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="col-xs-6">
  53. <div class="form-group">
  54. <label class="col-xs-3 control-label">服务开始时间 <span class="text-danger">*</span></label>
  55. <div class="col-xs-9">
  56. <input type="text" class="form-control" readonly id="start" name="start" value="{$info.start|default=''}">
  57. </div>
  58. </div>
  59. </div>
  60. <div class="col-xs-6">
  61. <div class="form-group">
  62. <label class="col-xs-3 control-label">年龄</label>
  63. <div class="col-xs-9">
  64. <input type="number" class="form-control" name="age" value="{$info.age|default=''}">
  65. </div>
  66. </div>
  67. </div>
  68. <div class="col-xs-6">
  69. <div class="form-group">
  70. <label class="col-xs-3 control-label">床号</label>
  71. <div class="col-xs-9">
  72. <input type="text" class="form-control" name="bed" value="{$info.bed|default=''}">
  73. </div>
  74. </div>
  75. </div>
  76. <div class="col-xs-6">
  77. <div class="form-group">
  78. <label class="col-xs-3 control-label">所患疾病</label>
  79. <div class="col-xs-9">
  80. <input type="text" class="form-control" name="ill" value="{$info.ill|default=''}">
  81. </div>
  82. </div>
  83. </div>
  84. <div class="form-group">
  85. <label class="col-sm-2 control-label">科室/部门 <span class="text-danger">*</span></label>
  86. <div class="col-sm-7">
  87. <select name="depId" class="form-control">
  88. <option value="">选择科室/部门</option>
  89. {volist name="dep" id="v"}
  90. <option value="{$v.id}">{$v.title}</option>
  91. {/volist}
  92. </select>
  93. </div>
  94. </div>
  95. <div class="form-group">
  96. <label class="col-sm-2 control-label">陪护服务<span class="text-danger">*</span></label>
  97. <div class="col-sm-7">
  98. <select name="cateId" class="form-control" onchange="changeService(this)">
  99. <option value="">选择服务</option>
  100. {volist name="cate" id="v"}
  101. <option value="{$v.id}">{$v.title}</option>
  102. {/volist}
  103. </select>
  104. </div>
  105. </div>
  106. <div class="form-group">
  107. <label class="col-sm-2 control-label">价格(/人/天)</label>
  108. <div class="col-sm-7">
  109. <input type="number" class="form-control" id="price" name="price" value="{$info.price|default=''}">
  110. </div>
  111. </div>
  112. <!-- <div class="form-group">-->
  113. <!-- <label class="col-sm-2 control-label">预收金</label>-->
  114. <!-- <div class="col-sm-7">-->
  115. <!-- <input type="number" class="form-control" name="preMoney" value="{$info.pre_money|default=''}">-->
  116. <!-- </div>-->
  117. <!-- </div>-->
  118. <div class="form-group">
  119. <label class="col-sm-2 control-label">执行护工</label>
  120. <div class="col-sm-7">
  121. {:widget('common/multiselect',['name'=>'uids','lists' => $workers, 'val' => []])}
  122. </div>
  123. </div>
  124. <div class="hr-line-dashed"></div>
  125. <div class="form-group">
  126. <div class="col-sm-4 col-sm-offset-2">
  127. <button class="btn btn-primary ajax-post" data-layer_c="1" target-form="form-horizontal" type="submit">确 定</button>
  128. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  129. </div>
  130. </div>
  131. </form>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. {/block}
  137. {block name="script"}
  138. <script type="text/javascript" src="/static/layDate-v5.0.9/laydate.js"></script>
  139. <script>
  140. laydate.render({
  141. elem: '#start',
  142. //设置开始日期、日期日期的 input 选择器
  143. //数组格式为 5.3.0 开始新增,之前版本直接配置 true 或任意分割字符即可
  144. type: 'datetime',
  145. trigger: 'click',
  146. theme: '#148d8f'
  147. });
  148. var cates = JSON.parse('{:json_encode($cate)}');
  149. function changeService(_self) {
  150. console.log(cates);
  151. var cateId = $(_self).val();
  152. var price = '';
  153. console.log(cateId);
  154. for (let o in cates){
  155. if(cates[o].id == cateId){
  156. price = cates[o].price;
  157. break;
  158. }
  159. }
  160. console.log(price);
  161. $('#price').val(price);
  162. }
  163. </script>
  164. {/block}