send.html 21 KB

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