ts_send.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  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" >{$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. <option value="98">投诉</option>
  28. </select>
  29. </div>
  30. </div>
  31. <div id="bx" style="display: none">
  32. <div class="col-sm-6">
  33. <div class="form-group">
  34. <label class="control-label">报修事项<span class="text-danger">*</span></label></br>
  35. <div class="rr">
  36. {:widget('common/select',['name'=>'type_id','lists'=>$order_type_list,'value'=>''])}
  37. </div>
  38. </div>
  39. </div>
  40. <div class="col-sm-6">
  41. <div class="form-group">
  42. <label class="control-label">报修地址</label></br>
  43. {:widget('common/select',['name'=>'address_id','lists'=>$address_list,'value'=>''])}
  44. </div>
  45. </div>
  46. </div>
  47. <div id="ys" style="display: none">
  48. <div class="col-sm-6">
  49. <div class="form-group">
  50. <label class="control-label">开始地点<span class="text-danger">*</span></label></br>
  51. <div class="rr">
  52. <input type="hidden" name="start" id="start" value="">
  53. <el-select v-model="start" size="small" clearable style="width: 100%" filterable placeholder="请选择">
  54. <el-option
  55. v-for="item in starts"
  56. :key="item.id"
  57. :label="item.title"
  58. :value="item.id.toString()">
  59. </el-option>
  60. </el-select>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="col-sm-6">
  65. <div class="form-group">
  66. <label class="control-label">运送类型<span class="text-danger">*</span></label></br>
  67. <input type="hidden" name="type" id="type" value="">
  68. <el-select v-model="type" size="small" clearable style="width: 100%" filterable placeholder="请选择">
  69. <el-option
  70. v-for="item in types"
  71. :key="item.id"
  72. :label="item.title"
  73. :value="item.id.toString()">
  74. </el-option>
  75. </el-select>
  76. </div>
  77. </div>
  78. <div class="col-sm-6">
  79. <div class="form-group">
  80. <label class="control-label">结束地点<span class="text-danger">*</span></label></br>
  81. <div class="rr">
  82. <input type="hidden" name="end" id="end" value="">
  83. <el-select v-model="end" size="small" clearable style="width: 100%" filterable placeholder="请选择">
  84. <el-option
  85. v-for="item in ends"
  86. :key="item.id"
  87. :label="item.title"
  88. :value="item.id.toString()">
  89. </el-option>
  90. </el-select>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="col-sm-6">
  95. <div class="form-group">
  96. <label class="control-label">优 &nbsp;先 &nbsp;级</label></br>
  97. <input type="hidden" name="priority" id="priority" value="">
  98. <el-select v-model="priority" size="small" clearable style="width: 100%" placeholder="请选择">
  99. <el-option
  100. v-for="(item,index) in prioritys"
  101. :key="index"
  102. :label="item"
  103. :value="index.toString()">
  104. </el-option>
  105. </el-select>
  106. </div>
  107. </div>
  108. <div class="col-sm-12">
  109. <div class="form-group">
  110. <label class="control-label">运送工具</label></br>
  111. <input type="hidden" name="device_id" id="device" value="">
  112. <el-select v-model="device" size="small" style="width: 100%" clearable filterable placeholder="请选择">
  113. <el-option
  114. v-for="item in devices"
  115. :key="item.id"
  116. :label="item.title"
  117. :value="item.id.toString()">
  118. </el-option>
  119. </el-select>
  120. </div>
  121. </div>
  122. <div class="col-sm-6">
  123. <div class="form-group">
  124. <label class="control-label">需求时间<span class="text-danger">*</span></label></br>
  125. <div class="rr">
  126. <input type="hidden" name="xq_time" id="xqtime" value="">
  127. <el-date-picker
  128. style="width: 100%"
  129. size="small"
  130. v-model="xq_time"
  131. type="datetime"
  132. :editable="false"
  133. value-format="yyyy-MM-dd HH:mm"
  134. :clearable="true"
  135. placeholder="选择日期时间">
  136. </el-date-picker>
  137. </div>
  138. </div>
  139. </div>
  140. <div class="col-sm-6">
  141. <div class="form-group">
  142. <label class="control-label">应完成时间<span class="text-danger">*</span></label></br>
  143. <input type="hidden" name="ywc_time" id="ywctime" value="">
  144. <el-date-picker
  145. style="width: 100%"
  146. size="small"
  147. v-model="ywc_time"
  148. type="datetime"
  149. :editable="false"
  150. value-format="yyyy-MM-dd HH:mm"
  151. :clearable="true"
  152. placeholder="选择日期时间">
  153. </el-date-picker>
  154. </div>
  155. </div>
  156. <div class="col-sm-6">
  157. <div class="form-group">
  158. <label class="control-label">联系人</label></br>
  159. <div class="rr">
  160. <input type="text" class="form-control" name="name">
  161. </div>
  162. </div>
  163. </div>
  164. <div class="col-sm-6">
  165. <div class="form-group">
  166. <label class="control-label">联系电话</label></br>
  167. <input type="text" class="form-control" name="phone">
  168. </div>
  169. </div>
  170. <div id="patient">
  171. <div class="col-sm-4">
  172. <div class="form-group">
  173. <label class="control-label">床号</label></br>
  174. <div class="rr">
  175. <input type="text" class="form-control" {if $opt && $opt.bed_number} value="" {/if} name="bed_number">
  176. </div>
  177. </div>
  178. </div>
  179. <div class="col-sm-4">
  180. <div class="form-group">
  181. <label class="control-label">姓名</label></br>
  182. <div class="rr">
  183. <input type="text" class="form-control" {if $opt && $opt.name} value="" {/if} name="p_name">
  184. </div>
  185. </div>
  186. </div>
  187. <div class="col-sm-4">
  188. <div class="form-group">
  189. <label class="control-label">病案号</label></br>
  190. <input type="text" class="form-control" {if $opt && $opt.ba_number} value="" {/if} name="ba_number">
  191. </div>
  192. </div>
  193. <div class="col-sm-6">
  194. <div class="form-group">
  195. <label class="control-label">性别</label></br>
  196. <div class="rr">
  197. <select name="gender" class="form-control">
  198. <option {if $opt && $opt.gender==0} selected {/if} value="0">未知</option>
  199. <option {if $opt && $opt.gender==1} selected {/if} value="1">男</option>
  200. <option {if $opt && $opt.gender==2} selected {/if} value="2">女</option>
  201. </select>
  202. </div>
  203. </div>
  204. </div>
  205. <div class="col-sm-6">
  206. <div class="form-group">
  207. <label class="control-label">是否往返</label></br>
  208. <select name="back" class="form-control">
  209. <option value="0">否</option>
  210. <option value="1">是</option>
  211. </select>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. <div class="col-sm-12">
  217. <div class="form-group">
  218. <label class="control-label">备注</label></br>
  219. <textarea name="todo_content" class="form-control" cols="30" rows="3" ></textarea>
  220. </div>
  221. </div>
  222. <div class="col-sm-12">
  223. <div class="hr-line-dashed">
  224. </div>
  225. </div>
  226. <div class="form-group">
  227. <div class="col-sm-6 col-sm-offset-2">
  228. <button class="btn btn-primary ajax-post" data-layer_d="1" data-reload="1" target-form="form-horizontal" type="submit">确 定</button>
  229. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  230. </div>
  231. </div>
  232. </form>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. {/block}
  238. {block name="script"}
  239. <script>
  240. function setType(val) {
  241. if(val==1){
  242. $("#type1").css('display','block')
  243. $("#type2").css('display','none')
  244. }else {
  245. $("#type2").css('display','block')
  246. $("#type1").css('display','none')
  247. }
  248. }
  249. function setWorkType(val) {
  250. if(val <0){
  251. $("#user0").css('display','none')
  252. $("#user1").css('display','none')
  253. $("#user2").css('display','none')
  254. $("#user3").css('display','none')
  255. $("#user4").css('display','none')
  256. $("#bx").css('display','none')
  257. $("#ys").css('display','none')
  258. $("#type1").css('display','none')
  259. $("#type2").css('display','none')
  260. $("#type3").css('display','none')
  261. }else {
  262. $("#type3").css('display','block')
  263. if($('#us option:selected').val()==1){
  264. $("#type1").css('display','block')
  265. $("#type2").css('display','none')
  266. }else {
  267. $("#type2").css('display','block')
  268. $("#type1").css('display','none')
  269. }
  270. if(val==0){
  271. $("#user0").css('display','block')
  272. $("#d0").css('display','block')
  273. $("#user1").css('display','none')
  274. $("#d1").css('display','none')
  275. $("#user2").css('display','none')
  276. $("#d2").css('display','none')
  277. $("#user3").css('display','none')
  278. $("#d3").css('display','none')
  279. $("#user4").css('display','none')
  280. $("#d4").css('display','none')
  281. $("#bx").css('display','none')
  282. $("#ys").css('display','none')
  283. }
  284. if(val==1){
  285. $("#user0").css('display','none')
  286. $("#d0").css('display','none')
  287. $("#user1").css('display','block')
  288. $("#d1").css('display','block')
  289. $("#user2").css('display','none')
  290. $("#d2").css('display','none')
  291. $("#user3").css('display','none')
  292. $("#d3").css('display','none')
  293. $("#user4").css('display','none')
  294. $("#d4").css('display','none')
  295. $("#bx").css('display','block')
  296. $("#ys").css('display','none')
  297. }
  298. if(val==2){
  299. $("#user0").css('display','none')
  300. $("#d0").css('display','none')
  301. $("#user1").css('display','none')
  302. $("#d1").css('display','none')
  303. $("#user2").css('display','block')
  304. $("#d2").css('display','block')
  305. $("#user3").css('display','none')
  306. $("#d3").css('display','none')
  307. $("#user4").css('display','none')
  308. $("#d4").css('display','none')
  309. $("#bx").css('display','none')
  310. $("#ys").css('display','none')
  311. }
  312. if(val==3){
  313. $("#user0").css('display','none')
  314. $("#d0").css('display','none')
  315. $("#user1").css('display','none')
  316. $("#d1").css('display','none')
  317. $("#user2").css('display','none')
  318. $("#d2").css('display','none')
  319. $("#user3").css('display','block')
  320. $("#d3").css('display','block')
  321. $("#user4").css('display','none')
  322. $("#d4").css('display','none')
  323. $("#bx").css('display','none')
  324. $("#ys").css('display','block')
  325. }
  326. if(val==4){
  327. $("#user0").css('display','none')
  328. $("#d0").css('display','none')
  329. $("#user1").css('display','none')
  330. $("#d1").css('display','none')
  331. $("#user2").css('display','none')
  332. $("#d2").css('display','none')
  333. $("#user3").css('display','none')
  334. $("#d3").css('display','none')
  335. $("#user4").css('display','block')
  336. $("#d4").css('display','block')
  337. $("#bx").css('display','none')
  338. $("#ys").css('display','none')
  339. }
  340. }
  341. }
  342. if('{$ps}'=='1'){
  343. $('#patient').hide();
  344. }
  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}