ts_send.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <style>
  4. .rr{
  5. padding-right: 10px;
  6. }
  7. </style>
  8. <div class="row">
  9. <div class="col-sm-12">
  10. <div class="ibox float-e-margins">
  11. <div class="ibox-content">
  12. <form method="post" action="{:url('ts_send',[],'')}/id/{$id}" class="form-horizontal">
  13. <div class="col-sm-12">
  14. <div class="form-group">
  15. <label class="control-label">处理意见</label></br>
  16. <textarea name="cl_remark" class="form-control" cols="30" rows="3" >{$complain['note'] | default=''}</textarea>
  17. </div>
  18. </div>
  19. <div class="col-sm-12">
  20. <div class="form-group">
  21. <label class="control-label">转单类型<span class="text-danger">*</span></label></br>
  22. <select name="work_type_mode" onchange="setWorkType(this.value)" class="form-control">
  23. <option value="-1">选择转单类型</option>
  24. {foreach $workType as $k=>$v}
  25. {if condition="in_array($v.id,$auths)"}
  26. <option value="{$v.id}">{$v.name}</option>
  27. {/if}
  28. {/foreach}
  29. <option value="99">隐患</option>
  30. </select>
  31. </div>
  32. </div>
  33. <div id="bx" style="display: none">
  34. <div class="col-sm-6">
  35. <div class="form-group">
  36. <label class="control-label">报修事项<span class="text-danger">*</span></label></br>
  37. <div class="rr">
  38. {:widget('common/select',['name'=>'type_id','lists'=>$order_type_list,'value'=>''])}
  39. </div>
  40. </div>
  41. </div>
  42. <div class="col-sm-6">
  43. <div class="form-group">
  44. <label class="control-label">报修地址</label></br>
  45. {:widget('common/select',['name'=>'address_id','lists'=>$address_list,'value'=>''])}
  46. </div>
  47. </div>
  48. </div>
  49. <div id="ys" style="display: none">
  50. <div class="col-sm-6">
  51. <div class="form-group">
  52. <label class="control-label">开始地点<span class="text-danger">*</span></label></br>
  53. <div class="rr">
  54. <input type="hidden" name="start" id="start" value="">
  55. <el-select v-model="start" size="small" clearable style="width: 100%" filterable placeholder="请选择">
  56. <el-option
  57. v-for="item in starts"
  58. :key="item.id"
  59. :label="item.title"
  60. :value="item.id.toString()">
  61. </el-option>
  62. </el-select>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="col-sm-6">
  67. <div class="form-group">
  68. <label class="control-label">运送类型<span class="text-danger">*</span></label></br>
  69. <input type="hidden" name="type" id="type" value="">
  70. <el-select v-model="type" size="small" clearable style="width: 100%" filterable placeholder="请选择">
  71. <el-option
  72. v-for="item in types"
  73. :key="item.id"
  74. :label="item.title"
  75. :value="item.id.toString()">
  76. </el-option>
  77. </el-select>
  78. </div>
  79. </div>
  80. <div class="col-sm-6">
  81. <div class="form-group">
  82. <label class="control-label">结束地点<span class="text-danger">*</span></label></br>
  83. <div class="rr">
  84. <input type="hidden" name="end" id="end" value="">
  85. <el-select v-model="end" size="small" clearable style="width: 100%" filterable placeholder="请选择">
  86. <el-option
  87. v-for="item in ends"
  88. :key="item.id"
  89. :label="item.title"
  90. :value="item.id.toString()">
  91. </el-option>
  92. </el-select>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="col-sm-6">
  97. <div class="form-group">
  98. <label class="control-label">优 &nbsp;先 &nbsp;级</label></br>
  99. <input type="hidden" name="priority" id="priority" value="">
  100. <el-select v-model="priority" size="small" clearable style="width: 100%" placeholder="请选择">
  101. <el-option
  102. v-for="(item,index) in prioritys"
  103. :key="index"
  104. :label="item"
  105. :value="index.toString()">
  106. </el-option>
  107. </el-select>
  108. </div>
  109. </div>
  110. <div class="col-sm-12">
  111. <div class="form-group">
  112. <label class="control-label">运送工具</label></br>
  113. <input type="hidden" name="device_id" id="device" value="">
  114. <el-select v-model="device" size="small" style="width: 100%" clearable filterable placeholder="请选择">
  115. <el-option
  116. v-for="item in devices"
  117. :key="item.id"
  118. :label="item.title"
  119. :value="item.id.toString()">
  120. </el-option>
  121. </el-select>
  122. </div>
  123. </div>
  124. <div class="col-sm-6">
  125. <div class="form-group">
  126. <label class="control-label">需求时间<span class="text-danger">*</span></label></br>
  127. <div class="rr">
  128. <input type="hidden" name="xq_time" id="xqtime" value="">
  129. <el-date-picker
  130. style="width: 100%"
  131. size="small"
  132. v-model="xq_time"
  133. type="datetime"
  134. :editable="false"
  135. value-format="yyyy-MM-dd HH:mm"
  136. :clearable="true"
  137. placeholder="选择日期时间">
  138. </el-date-picker>
  139. </div>
  140. </div>
  141. </div>
  142. <div class="col-sm-6">
  143. <div class="form-group">
  144. <label class="control-label">应完成时间<span class="text-danger">*</span></label></br>
  145. <input type="hidden" name="ywc_time" id="ywctime" value="">
  146. <el-date-picker
  147. style="width: 100%"
  148. size="small"
  149. v-model="ywc_time"
  150. type="datetime"
  151. :editable="false"
  152. value-format="yyyy-MM-dd HH:mm"
  153. :clearable="true"
  154. placeholder="选择日期时间">
  155. </el-date-picker>
  156. </div>
  157. </div>
  158. <div class="col-sm-6">
  159. <div class="form-group">
  160. <label class="control-label">联系人</label></br>
  161. <div class="rr">
  162. <input type="text" class="form-control" name="name">
  163. </div>
  164. </div>
  165. </div>
  166. <div class="col-sm-6">
  167. <div class="form-group">
  168. <label class="control-label">联系电话</label></br>
  169. <input type="text" class="form-control" name="phone">
  170. </div>
  171. </div>
  172. <div id="patient">
  173. <div class="col-sm-4">
  174. <div class="form-group">
  175. <label class="control-label">床号</label></br>
  176. <div class="rr">
  177. <input type="text" class="form-control" name="bed_number">
  178. </div>
  179. </div>
  180. </div>
  181. <div class="col-sm-4">
  182. <div class="form-group">
  183. <label class="control-label">姓名</label></br>
  184. <div class="rr">
  185. <input type="text" class="form-control" name="p_name">
  186. </div>
  187. </div>
  188. </div>
  189. <div class="col-sm-4">
  190. <div class="form-group">
  191. <label class="control-label">病案号</label></br>
  192. <input type="text" class="form-control" name="ba_number">
  193. </div>
  194. </div>
  195. <div class="col-sm-6">
  196. <div class="form-group">
  197. <label class="control-label">性别</label></br>
  198. <div class="rr">
  199. <select name="gender" class="form-control">
  200. <option value="0">未知</option>
  201. <option value="1">男</option>
  202. <option value="2">女</option>
  203. </select>
  204. </div>
  205. </div>
  206. </div>
  207. <div class="col-sm-6">
  208. <div class="form-group">
  209. <label class="control-label">是否往返</label></br>
  210. <select name="back" class="form-control">
  211. <option value="0">否</option>
  212. <option value="1">是</option>
  213. </select>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="col-sm-12">
  219. <div class="form-group">
  220. <label class="control-label">备注</label></br>
  221. <textarea name="todo_content" class="form-control" cols="30" rows="3" ></textarea>
  222. </div>
  223. </div>
  224. <div class="col-sm-12">
  225. <div class="hr-line-dashed">
  226. </div>
  227. </div>
  228. <div class="form-group">
  229. <div class="col-sm-6 col-sm-offset-2">
  230. <button class="btn btn-primary ajax-post" data-layer_d="1" data-reload="1" target-form="form-horizontal" type="submit">确 定</button>
  231. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  232. </div>
  233. </div>
  234. </form>
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. {/block}
  240. {block name="script"}
  241. <script>
  242. function setType(val) {
  243. if(val==1){
  244. $("#type1").css('display','block')
  245. $("#type2").css('display','none')
  246. }else {
  247. $("#type2").css('display','block')
  248. $("#type1").css('display','none')
  249. }
  250. }
  251. function setWorkType(val) {
  252. if(val <0){
  253. $("#user0").css('display','none')
  254. $("#user1").css('display','none')
  255. $("#user2").css('display','none')
  256. $("#user3").css('display','none')
  257. $("#user4").css('display','none')
  258. $("#bx").css('display','none')
  259. $("#ys").css('display','none')
  260. $("#type1").css('display','none')
  261. $("#type2").css('display','none')
  262. $("#type3").css('display','none')
  263. }else {
  264. $("#type3").css('display','block')
  265. if($('#us option:selected').val()==1){
  266. $("#type1").css('display','block')
  267. $("#type2").css('display','none')
  268. }else {
  269. $("#type2").css('display','block')
  270. $("#type1").css('display','none')
  271. }
  272. if(val==0){
  273. $("#user0").css('display','block')
  274. $("#d0").css('display','block')
  275. $("#user1").css('display','none')
  276. $("#d1").css('display','none')
  277. $("#user2").css('display','none')
  278. $("#d2").css('display','none')
  279. $("#user3").css('display','none')
  280. $("#d3").css('display','none')
  281. $("#user4").css('display','none')
  282. $("#d4").css('display','none')
  283. $("#bx").css('display','none')
  284. $("#ys").css('display','none')
  285. }
  286. if(val==1){
  287. $("#user0").css('display','none')
  288. $("#d0").css('display','none')
  289. $("#user1").css('display','block')
  290. $("#d1").css('display','block')
  291. $("#user2").css('display','none')
  292. $("#d2").css('display','none')
  293. $("#user3").css('display','none')
  294. $("#d3").css('display','none')
  295. $("#user4").css('display','none')
  296. $("#d4").css('display','none')
  297. $("#bx").css('display','block')
  298. $("#ys").css('display','none')
  299. }
  300. if(val==2){
  301. $("#user0").css('display','none')
  302. $("#d0").css('display','none')
  303. $("#user1").css('display','none')
  304. $("#d1").css('display','none')
  305. $("#user2").css('display','block')
  306. $("#d2").css('display','block')
  307. $("#user3").css('display','none')
  308. $("#d3").css('display','none')
  309. $("#user4").css('display','none')
  310. $("#d4").css('display','none')
  311. $("#bx").css('display','none')
  312. $("#ys").css('display','none')
  313. }
  314. if(val==3){
  315. $("#user0").css('display','none')
  316. $("#d0").css('display','none')
  317. $("#user1").css('display','none')
  318. $("#d1").css('display','none')
  319. $("#user2").css('display','none')
  320. $("#d2").css('display','none')
  321. $("#user3").css('display','block')
  322. $("#d3").css('display','block')
  323. $("#user4").css('display','none')
  324. $("#d4").css('display','none')
  325. $("#bx").css('display','none')
  326. $("#ys").css('display','block')
  327. }
  328. if(val==4){
  329. $("#user0").css('display','none')
  330. $("#d0").css('display','none')
  331. $("#user1").css('display','none')
  332. $("#d1").css('display','none')
  333. $("#user2").css('display','none')
  334. $("#d2").css('display','none')
  335. $("#user3").css('display','none')
  336. $("#d3").css('display','none')
  337. $("#user4").css('display','block')
  338. $("#d4").css('display','block')
  339. $("#bx").css('display','none')
  340. $("#ys").css('display','none')
  341. }
  342. }
  343. }
  344. $('#patient').hide();
  345. var vdevices = {:json_encode($order_device)};
  346. new Vue({
  347. el: '#ys',
  348. data: function() {
  349. return {
  350. starts: {:json_encode($address)},
  351. start: '',
  352. ends: {:json_encode($address)},
  353. end: '',
  354. types: {:json_encode($order_convey_type)},
  355. type:'',
  356. prioritys:{:json_encode($priority)},
  357. priority: '',
  358. devices: {:json_encode($order_device)},
  359. device: '',
  360. xq_time: '',
  361. ywc_time:'',
  362. }
  363. },
  364. watch: {
  365. type: function (newtype, oldtype) {
  366. $('#type').val(newtype);
  367. this.types.forEach((item) => {
  368. if(item.id == newtype){
  369. console.log(item);
  370. this.end = item.ends > 0?parseInt(item.ends).toString():'';
  371. this.xq_time = item.xq_time?item.xq_time:'';
  372. this.ywc_time = item.ywc_time?item.ywc_time:'';
  373. this.priority = item.priority > 0?item.priority.toString():'';
  374. if(item.cate == 1){
  375. let devices = [];
  376. vdevices.forEach((item) => {
  377. if(item.patient == 1){
  378. devices.push(item);
  379. }
  380. });
  381. this.devices = devices;
  382. $('#patient').show();
  383. }else{
  384. this.devices = vdevices;
  385. $('#patient').hide();
  386. }
  387. }
  388. });
  389. },
  390. start: function (newtype, oldtype) {
  391. $('#start').val(newtype);
  392. },
  393. end: function (newtype, oldtype) {
  394. $('#end').val(newtype);
  395. },
  396. priority: function (newtype, oldtype) {
  397. $('#priority').val(newtype);
  398. },
  399. device: function (newtype, oldtype) {
  400. $('#device').val(newtype);
  401. },
  402. xq_time: function (newtype, oldtype) {
  403. $('#xqtime').val(newtype);
  404. },
  405. ywc_time: function (newtype, oldtype) {
  406. $('#ywctime').val(newtype);
  407. },
  408. }
  409. })
  410. </script>
  411. {/block}