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