Geen omschrijving

add6.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link href="../css/init.css" rel="stylesheet" />
  7. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link rel="stylesheet" href="../css/WorkOrder/jquery.editable-select.css" />
  10. <!-- <link rel="stylesheet" href="../js/comboSelect/combo.select.css" /> -->
  11. <link rel="stylesheet" href="../css/init.css" />
  12. <!-- <link rel="stylesheet" href="../css/WorkOrder/NewAddWorkOrder.css" /> -->
  13. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  14. <link href="../css/WorkOrder/Search.css" rel="stylesheet">
  15. <!-- <link rel="stylesheet" href="../js/comboSelect/combo.select.css" /> -->
  16. <link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
  17. <link href="../css/init.css" rel="stylesheet" />
  18. <title></title>
  19. <style>
  20. ul li {
  21. float: initial;
  22. list-style: none;
  23. }
  24. .repeat-btn{
  25. width: 100%;
  26. margin: 30px 0 0 0;
  27. text-align: center;
  28. }
  29. .ckxq .gdxq ul li{
  30. width: 100%;
  31. overflow: hidden;
  32. }
  33. .ckxq .gdxq ul li .left{
  34. width: 40%;
  35. float: left;
  36. }
  37. .ckxq .gdxq ul li .right{
  38. width: 60%;
  39. float: left;
  40. }
  41. .selDpart1{
  42. display: none;
  43. position: absolute;
  44. left: 360px;
  45. top: 145px;
  46. z-index: 11111;
  47. width: 280px;
  48. line-height: 30px;
  49. background: #FFFFFF;
  50. }
  51. #sponsor{
  52. width: 280px;
  53. border: 1px solid #00a1cb;
  54. margin: 0;
  55. padding: 0;
  56. list-style: none;
  57. max-height: 212px;
  58. overflow-x: hidden;
  59. overflow-y: scroll;
  60. }
  61. #sponsor li{
  62. margin: 0;
  63. padding-left: 10px;
  64. width: 280px;
  65. height: 30px;
  66. line-height: 30px;
  67. list-style: none;
  68. }
  69. #sponsor li:hover{
  70. background: #00a1cb;
  71. }
  72. .thumbnail {
  73. margin: 0 10px 10px;
  74. padding: 4px;
  75. float: left;
  76. width: 30%;
  77. height: 200px;
  78. background-color: #fff;
  79. border: 1px solid #ddd;
  80. border-radius: 4px;
  81. position: relative;
  82. cursor: pointer;
  83. }
  84. .thumbnail img {
  85. width: 100%;
  86. height: 100%;
  87. }
  88. .thumbnail .info {
  89. position: absolute;
  90. left: 4px;
  91. bottom: 4px;
  92. right: 4px;
  93. height: 35px;
  94. line-height: 35px;
  95. text-indent: 5px;
  96. background: rgba(0, 0, 0, 0.6);
  97. color: white;
  98. overflow: hidden;
  99. white-space: nowrap;
  100. text-overflow: ellipsis;
  101. font-size: 12px;
  102. z-index: 10;
  103. display: none;
  104. }
  105. .thumbnail:hover .info {
  106. display: block;
  107. }
  108. #djtime{
  109. display: none;
  110. }
  111. </style>
  112. </head>
  113. <body class="gray-bg">
  114. <div class="ckxq">
  115. <div class="gdxq">
  116. <div class="container wrapper-content animated fadeInRight">
  117. <ul class="form-horizontal">
  118. <div class="form-group" id="djtime">
  119. <label for="Szzyzzys" class="col-sm-3 control-label text-right">登记时间:</label>
  120. <div class="col-sm-9">
  121. <input id="Szzydjsj" class="dis" type="text" value=""></input>
  122. </div>
  123. </div>
  124. <div class="form-group">
  125. <label for="Szzyyydw" class="col-sm-3 control-label text-right"><b
  126. class="text_require">*</b>转诊单位:</label>
  127. <div class="col-sm-9 ">
  128. <input list="Szzyyydw" type="text" class="Szzyyydw form-control" />
  129. </div>
  130. <datalist id="Szzyyydw">
  131. </datalist>
  132. </div>
  133. <li class="form-group">
  134. <label for="Hzname" class="col-sm-3 control-label text-right">患者姓名:</label>
  135. <div class="right col-sm-9 "><input id="Hzname" type="text" onkeyup="darptSearch()"></input>
  136. </div>
  137. <div class="selDpart1">
  138. <ul id="sponsor">
  139. </ul>
  140. </div>
  141. </li>
  142. <div class="form-group">
  143. <label for="HzGender" class="col-sm-3 control-label text-right">性别:</label>
  144. <div class="col-sm-9">
  145. <input id="HzGender" class="dis" type="text" value=""></input>
  146. </div>
  147. </div>
  148. <div class="form-group">
  149. <label for="Hzage" class="col-sm-3 control-label text-right">年龄:</label>
  150. <div class="col-sm-9">
  151. <input id="Hzage" class="dis" type="text" value=""></input>
  152. </div>
  153. </div>
  154. <div class="form-group">
  155. <label for="Hzzd" class="col-sm-3 control-label text-right">诊断:</label>
  156. <div class="col-sm-9">
  157. <input id="Hzzd" class="dis" type="text" value=""></input>
  158. </div>
  159. </div>
  160. <div class="form-group">
  161. <label for="Hzjzks" class="col-sm-3 control-label text-right"><b
  162. class="text_require">*</b>住院科室:</label>
  163. <div class="col-sm-9 ">
  164. <input list="Hzjzks" type="text" class="Hzjzks form-control" />
  165. </div>
  166. <datalist id="Hzjzks">
  167. </datalist>
  168. </div>
  169. <div class="form-group">
  170. <label for="Hzzyh" class="col-sm-3 control-label text-right">住院号:</label>
  171. <div class="col-sm-9">
  172. <input id="Hzzyh" class="dis" type="text" value=""></input>
  173. </div>
  174. </div>
  175. <div class="form-group">
  176. <label for="Syjhsj" class="col-sm-3 control-label text-right">接回时间:</label>
  177. <div class="col-sm-9">
  178. <input id="Syjhsj" class="dis" type="datetime-local" value=""></input>
  179. </div>
  180. </div>
  181. <div class="form-group">
  182. <label for="Sycysj" class="col-sm-3 control-label text-right">出院时间:</label>
  183. <div class="col-sm-9">
  184. <input id="Sycysj" class="dis" type="datetime-local" value=""></input>
  185. </div>
  186. </div>
  187. <div class="form-group">
  188. <label for="Syzzzyfy" class="col-sm-3 control-label text-right">住院费用:</label>
  189. <div class="col-sm-9">
  190. <input id="Syzzzyfy" class="dis" type="text" value=""></input>
  191. </div>
  192. </div>
  193. <div class="form-group">
  194. <label for="Syzzzrrss" class="col-sm-3 control-label text-right">责任人:</label>
  195. <div class="col-sm-9">
  196. <input id="Syzzzrrss" class="dis" type="text" value=""></input>
  197. </div>
  198. </div>
  199. </ul>
  200. </div>
  201. </div>
  202. </div>
  203. <div class="repeat-btn">
  204. <button class="btns" id="HY_save">提&nbsp;交</button>
  205. </div>
  206. <script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
  207. <script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
  208. <!-- <script src="../js/WorkOrder/WorkOrderDetails.js"></script> -->
  209. <script src="../js/laydate/laydate.js"></script>
  210. <script src="../js/download/download.js"></script>
  211. <script>
  212. $(document).ready(function() {
  213. getdept()
  214. darptSearch2()
  215. var ajaxUrl;
  216. var ids = helper.request.queryString("edit_id");
  217. if (ids) {
  218. ajaxUrl = "testusertypeapi/api/TestUserType/upWjzqjs";
  219. getValue(ids);
  220. $('#djtime').show()
  221. } else {
  222. ajaxUrl = "testusertypeapi/api/TestUserType/AddWjzqjs";
  223. $('#djtime').hide()
  224. }
  225. // var now=new Date();
  226. // $('#Szzydjsj').val(formatTime (now))
  227. laydate.render({
  228. elem: '#Szzydjsj',
  229. theme: '#249fea',
  230. value: $('#Szzydjsj').val()
  231. });
  232. //保存
  233. $("#HY_save").click(function() {
  234. // if(!$("#projectid").val()) {
  235. // layer.confirm('请选择设备状态!', {
  236. // icon: 2,
  237. // btn: ['确定'] //按钮
  238. // });
  239. // return;
  240. // }
  241. // if(!$("#equipname").val()) {
  242. // layer.confirm('请输入设备名称!', {
  243. // icon: 2,
  244. // btn: ['确定'] //按钮
  245. // });
  246. // return;
  247. // }
  248. addValue(ajaxUrl, ids);
  249. })
  250. })
  251. //住院科室
  252. function darptSearch2() {
  253. $.ajax({
  254. type: "get",
  255. url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/getalldeptnlists", //获取数据的Servlet地址
  256. async: true,
  257. dataType: 'json',
  258. data: {
  259. pageindex: 1,
  260. pagesize: 1000,
  261. },
  262. success: function(data) {
  263. var equipmentdata = []
  264. if (data.state.toLowerCase() == 'success') {
  265. equipmentdata = data.data
  266. // console.log(equipmentdata.length)
  267. if (equipmentdata.length > 0) {
  268. for (var k = 0; k < equipmentdata.length; k++) {
  269. $(equipmentdata[k]).each(function(q, p) {
  270. $('#Hzjzks')
  271. .append('<option label="' + p.name + '" value="' + p.name + '"></option>');
  272. // $("<option value='" + p.equipment_name + "'>" + p.equipment_name + "</option>").appendTo("#equipname");
  273. $("#Hzjzks").selectpicker('refresh');
  274. // console.log(p.equipment_name)
  275. });
  276. }
  277. } else {
  278. $("#Hzjzks").empty();
  279. $("#Hzjzks").selectpicker('refresh');
  280. }
  281. }
  282. }
  283. });
  284. }
  285. function getdept() {
  286. $.ajax({
  287. type: "get",
  288. url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/getyltdeptmanagetwo", //获取数据的Servlet地址
  289. async: true,
  290. dataType: 'json',
  291. data: {
  292. pageindex: 1,
  293. pagesize: 1000,
  294. },
  295. success: function(data) {
  296. var equipmentdata = []
  297. if (data.state.toLowerCase() == 'success') {
  298. equipmentdata = data.data
  299. // console.log(equipmentdata.length)
  300. if (equipmentdata.length > 0) {
  301. for (var k = 0; k < equipmentdata.length; k++) {
  302. $(equipmentdata[k]).each(function(q, p) {
  303. $('#Szzyyydw')
  304. .append('<option label="' + p.name + '" value="' + p.name + '"></option>');
  305. // $("<option value='" + p.equipment_name + "'>" + p.equipment_name + "</option>").appendTo("#equipname");
  306. $("#Szzyyydw").selectpicker('refresh');
  307. // console.log(p.equipment_name)
  308. });
  309. }
  310. } else {
  311. $("#Szzyyydw").empty();
  312. $("#Szzyyydw").selectpicker('refresh');
  313. }
  314. }
  315. }
  316. });
  317. }
  318. //患者姓名
  319. function darptSearch() {
  320. if ($('#Hzname').val() == '') {
  321. $(".selDpart1").css('display', 'none');
  322. } else {
  323. $(".selDpart1").css('display', 'block');
  324. getFormComplainedUnit();
  325. }
  326. }
  327. $("#sponsor").on('click', 'li', function() {
  328. $(".selDpart1").css('display', 'none');
  329. $("#Hzname").val($(this).html());
  330. var a=$(this).attr('index')
  331. console.log(a)
  332. // 获取患者信息
  333. $.ajax({
  334. type: "get",
  335. url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/gethzinflists",
  336. dataType: 'json',
  337. async: true,
  338. data: {
  339. id: a,
  340. },
  341. success: function(data) {
  342. if (data.state.toLowerCase() == "success") {
  343. $('#Yslxfs').val(data.data[0].Yslxfs); //
  344. $('#HzGender').val(data.data[0].HzGender); //
  345. $('#Hzage').val(data.data[0].Hzage); //
  346. //$('#Hzzd').val(data.data[0].Hzzd); //
  347. //$('#Hzzyh').val(data.data[0].Hzzyh); //
  348. // $('.Szzyyydw').val(data.data[0].Szzyzzdw); //
  349. }
  350. }
  351. });
  352. })
  353. function getFormComplainedUnit() {
  354. $("#sponsor").empty();
  355. $.ajax({
  356. type: "get",
  357. url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/gethzinflists",
  358. dataType: 'json',
  359. async: true,
  360. data: {
  361. name: $("#Hzname").val(),
  362. },
  363. success: function(data) {
  364. if (data.state.toLowerCase() == "success") {
  365. var content = data.data;
  366. if (content.length === 0) {
  367. $(".selDpart1").css('display', 'none');
  368. } else {
  369. $(content).each(function(i, n) {
  370. $("<li index='" + n.id + "' >" + n.Hzname + "</li>").appendTo("#sponsor");
  371. })
  372. }
  373. }
  374. }
  375. });
  376. }
  377. //获取详情
  378. function getValue(ids) {
  379. $.ajax({
  380. type: "get",
  381. url: huayi.config.callcenter_url + "testusertypeapi/api/TestUserType/GetWjzqjsbyid",
  382. async: true,
  383. dataType: 'json',
  384. data: {
  385. id: ids
  386. },
  387. success: function(data) {
  388. if (data.state.toLowerCase() == 'success') {
  389. if(data.data[0].Szzydjsj){
  390. var djsj=data.data[0].Szzydjsj.split(' ')
  391. for(var i=0;i<djsj.length;i++){
  392. $('#Szzydjsj').val(djsj[0]); //
  393. }
  394. }
  395. $('.Szzyyydw').val(data.data[0].Szzyzzdw); //
  396. $('#Szzyzzys').val(data.data[0].Szzyzzys); //
  397. $('#Yslxfs').val(data.data[0].Yslxfs); //
  398. $('#Hzname').val(data.data[0].Hzname); //
  399. $('#HzGender').val(data.data[0].HzGender); //
  400. $('#Hzage').val(data.data[0].Hzage); //
  401. $('#Hzzd').val(data.data[0].Hzzd); //
  402. $('.Hzjzks').val(data.data[0].Hzjzks); //
  403. $('#Hzzyh').val(data.data[0].Hzzyh); //
  404. if (data.data[0].Syccsj) {
  405. var ccsj = data.data[0].Syccsj.split(' ')
  406. for (var i = 0; i < ccsj.length; i++) {
  407. $('#Syccsj').val(ccsj[0] + 'T' + ccsj[1]); //
  408. }
  409. }
  410. if (data.data[0].Syjhsj) {
  411. var jhsj = data.data[0].Syjhsj.split(' ')
  412. for (var i = 0; i < jhsj.length; i++) {
  413. $('#Syjhsj').val(jhsj[0] + 'T' + jhsj[1]); //
  414. }
  415. }
  416. if (data.data[0].Sycysj) {
  417. var zysj = data.data[0].Sycysj.split(' ')
  418. for (var i = 0; i < zysj.length; i++) {
  419. $('#Sycysj').val(zysj[0] + 'T' + zysj[1]); //
  420. }
  421. }
  422. $('#Syzzzyfy').val(data.data[0].Syzzzyfy); //
  423. // $('#Syzzzrr').val(data.data[0].Syzzzrr); //
  424. $('#Syzzzhzzfw').val(data.data[0].Syzzzhzzfw); //
  425. $('#Syzzfkszys').val(data.data[0].Syzzfkszys); //
  426. $('#Syzzzrrss').val(data.data[0].Syzzzrrss); //
  427. }
  428. }
  429. });
  430. }
  431. function formatTime (date) {
  432. var year = date.getFullYear()
  433. var month = date.getMonth() + 1
  434. var day = date.getDate()
  435. var hour = date.getHours()
  436. var minute = date.getMinutes()
  437. var second = date.getSeconds()
  438. return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
  439. }
  440. function formatNumber ( n ) {
  441. n = n.toString();
  442. return n[1] ? n : '0' + n;
  443. }
  444. //添加
  445. function addValue(ajaxUrl, ids) {
  446. var $storages = window.localStorage;
  447. $.ajax({
  448. type: "get",
  449. url: huayi.config.callcenter_url + ajaxUrl,
  450. // url: "http://192.168.1.21:28230/api/Equipment/update",
  451. async: true,
  452. dataType: 'json',
  453. data: {
  454. id: ids,
  455. Szzydjsj: $('#Szzydjsj').val(), //登记时间
  456. Szzyzzdw: $('.Szzyzzdw').val(), //转诊单位
  457. Szzyzzys: $('#Szzyzzys').val(), //转诊医师
  458. Yslxfs: $('#Yslxfs').val(), //联系方式
  459. Hzname: $('#Hzname').val(), //患者姓名
  460. HzGender: $('#HzGender').val(), //患者性别
  461. Hzage: $('#Hzage').val(), //患者年龄
  462. Hzzd: $('#Hzzd').val(), //患者诊断
  463. Hzjzks: $('.Hzjzks').val(), //接诊科室
  464. Hzzyh: $('#Hzzyh').val(), //住院号
  465. Syccsj: $('#Syccsj').val(), //出车时间
  466. Syjhsj: $('#Syjhsj').val(), //接回时间
  467. Sycysj: $('#Sycysj').val(), //住院时间
  468. Syzzzyfy: $('#Syzzzyfy').val(), //住院费用
  469. Syzzzrr: $storages.getItem('userName'), //责任人
  470. Syzzzhzzfw: $('#Syzzzhzzfw').val(), //诊后追踪服务
  471. Syzzfkszys: $('#Syzzfkszys').val(), //反馈首诊医师
  472. Syzzzrrss: $('#Syzzzrrss').val() //责任人
  473. },
  474. success: function(data) {
  475. console.log(1)
  476. if (data.state.toLowerCase() == 'success') {
  477. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  478. parent.layer.close(index); //再执行关闭
  479. layer.msg(data.message);
  480. parent.initTable();
  481. }
  482. }
  483. });
  484. }
  485. </script>
  486. </body>
  487. </html>