yjhj_zd_send.html 21 KB

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