Nessuna descrizione

index.html 30KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>郑州市第一人民医院</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  7. <meta name="apple-mobile-web-app-capable" content="yes">
  8. <meta name="apple-mobile-web-app-status-bar-style" content="black">
  9. <link rel="stylesheet" href="../layui/css/layui.mobile.css" />
  10. <link href="../css/mui.min.css" rel="stylesheet" />
  11. <link rel="stylesheet" href="../css/app.css" />
  12. <link href="../css/mui.picker.css" rel="stylesheet" />
  13. <link href="../css/mui.picker.min.css" rel="stylesheet" />
  14. <link href="../css/mui.poppicker.css" rel="stylesheet" />
  15. <link rel="stylesheet" href="../css/iconfont.css" />
  16. <!--<link rel="stylesheet" type="text/css" href="../css/feedback-page.css" />-->
  17. <link rel="stylesheet" href="../js/webuploader/webuploader.css" />
  18. <link rel="stylesheet" href="../css/inits.css" />
  19. <style>
  20. .mui-bar-popover {
  21. width: 30%;
  22. }
  23. .mui-popover.mui-bar-popover .mui-table-view {
  24. width: 100%;
  25. }
  26. .mui-table-view .mui-table-view-cell > a:not(.mui-btn) {
  27. text-align: center;
  28. }
  29. .mui-table-view-cell {
  30. padding: 1px 15px !important;
  31. }
  32. .san {
  33. font-size: 14px;
  34. margin-right: 5px
  35. }
  36. .nav_a {
  37. border-right: 1px solid #ccc;
  38. }
  39. .radio_box {
  40. display: inline-block;
  41. }
  42. .mui-radio input[type=radio]:before {
  43. font-size: 20px;
  44. vertical-align: middle;
  45. }
  46. .mui-radio.mui-left input[type=radio] {
  47. line-height: 24px !important;
  48. }
  49. .mui-radio.mui-left label {
  50. padding-right: 1px !important;
  51. padding-left: 51px !important;
  52. }
  53. .ztext {
  54. width: 100%;
  55. margin: 0;
  56. border: 0;
  57. }
  58. .action {
  59. padding: 11px 15px;
  60. }
  61. .type_down {
  62. float: right !important;
  63. display: inline-block !important;
  64. vertical-align: middle !important;
  65. line-height: 42px;
  66. }
  67. .type_con {
  68. width: 55% !important;
  69. float: left !important;
  70. vertical-align: middle !important;
  71. display: inline-block !important;
  72. padding: 10px 0 !important;
  73. }
  74. .get_yzm {
  75. padding: 5px !important;
  76. width: auto !important;
  77. }
  78. .yzm_con {
  79. float: left !important;
  80. width: 40% !important;
  81. }
  82. .mui-btn {
  83. padding: 10px 25px !important;
  84. }
  85. .btn-grop {
  86. text-align: center;
  87. }
  88. @font-face {
  89. font-family: 'iconfont';
  90. /* project id 280843 */
  91. src: url('//at.alicdn.com/t/font_280843_7m2gttvpislfecdi.eot');
  92. src: url('//at.alicdn.com/t/font_280843_7m2gttvpislfecdi.eot?#iefix') format('embedded-opentype'), url('//at.alicdn.com/t/font_280843_7m2gttvpislfecdi.woff') format('woff'), url('//at.alicdn.com/t/font_280843_7m2gttvpislfecdi.ttf') format('truetype'), url('//at.alicdn.com/t/font_280843_7m2gttvpislfecdi.svg#iconfont') format('svg');
  93. }
  94. .iconfont {
  95. font-family: "iconfont";
  96. font-size: 20px;
  97. color: #13a7f1;
  98. font-style: normal;
  99. -webkit-font-smoothing: antialiased;
  100. -webkit-text-stroke-width: 0.2px;
  101. -moz-osx-font-smoothing: grayscale;
  102. }
  103. .image-list {
  104. width: 100%;
  105. background-size: cover;
  106. padding: 10px 10px;
  107. overflow: hidden;
  108. }
  109. #image-list {
  110. display: none;
  111. }
  112. /*自定义CSS*/
  113. .mui-preview-image.mui-fullscreen {
  114. position: fixed;
  115. z-index: 20;
  116. background-color: #000;
  117. }
  118. .mui-preview-header,
  119. .mui-preview-footer {
  120. position: absolute;
  121. width: 100%;
  122. left: 0;
  123. z-index: 10;
  124. }
  125. .mui-preview-header {
  126. height: 44px;
  127. top: 0;
  128. }
  129. .mui-preview-footer {
  130. height: 50px;
  131. bottom: 0px;
  132. }
  133. .mui-preview-header .mui-preview-indicator {
  134. display: block;
  135. line-height: 25px;
  136. color: #fff;
  137. text-align: center;
  138. margin: 15px auto 4;
  139. width: 70px;
  140. background-color: rgba(0, 0, 0, 0.4);
  141. border-radius: 12px;
  142. font-size: 16px;
  143. }
  144. .mui-preview-image {
  145. display: none;
  146. -webkit-animation-duration: 0.5s;
  147. animation-duration: 0.5s;
  148. -webkit-animation-fill-mode: both;
  149. animation-fill-mode: both;
  150. }
  151. .mui-preview-image.mui-preview-in {
  152. -webkit-animation-name: fadeIn;
  153. animation-name: fadeIn;
  154. }
  155. .mui-preview-image.mui-preview-out {
  156. background: none;
  157. -webkit-animation-name: fadeOut;
  158. animation-name: fadeOut;
  159. }
  160. .mui-preview-image.mui-preview-out .mui-preview-header,
  161. .mui-preview-image.mui-preview-out .mui-preview-footer {
  162. display: none;
  163. }
  164. .mui-zoom-scroller {
  165. position: absolute;
  166. display: -webkit-box;
  167. display: -webkit-flex;
  168. display: flex;
  169. -webkit-box-align: center;
  170. -webkit-align-items: center;
  171. align-items: center;
  172. -webkit-box-pack: center;
  173. -webkit-justify-content: center;
  174. justify-content: center;
  175. left: 0;
  176. right: 0;
  177. bottom: 0;
  178. top: 0;
  179. width: 100%;
  180. height: 100%;
  181. margin: 0;
  182. -webkit-backface-visibility: hidden;
  183. }
  184. .mui-zoom {
  185. -webkit-transform-style: preserve-3d;
  186. transform-style: preserve-3d;
  187. }
  188. .mui-slider .mui-slider-group .mui-slider-item img {
  189. width: auto;
  190. height: auto;
  191. max-width: 100%;
  192. max-height: 100%;
  193. }
  194. .mui-android-4-1 .mui-slider .mui-slider-group .mui-slider-item img {
  195. width: 100%;
  196. }
  197. .mui-android-4-1 .mui-slider.mui-preview-image .mui-slider-group .mui-slider-item {
  198. display: inline-table;
  199. }
  200. .mui-android-4-1 .mui-slider.mui-preview-image .mui-zoom-scroller img {
  201. display: table-cell;
  202. vertical-align: middle;
  203. }
  204. .mui-preview-loading {
  205. position: absolute;
  206. width: 100%;
  207. height: 100%;
  208. top: 0;
  209. left: 0;
  210. display: none;
  211. }
  212. .mui-preview-loading.mui-active {
  213. display: block;
  214. }
  215. .mui-preview-loading .mui-spinner-white {
  216. position: absolute;
  217. top: 50%;
  218. left: 50%;
  219. margin-left: -25px;
  220. margin-top: -25px;
  221. height: 50px;
  222. width: 50px;
  223. }
  224. .mui-preview-image img.mui-transitioning {
  225. -webkit-transition: -webkit-transform 0.5s ease, opacity 0.5s ease;
  226. transition: transform 0.5s ease, opacity 0.5s ease;
  227. }
  228. @-webkit-keyframes fadeIn {
  229. 0% {
  230. opacity: 0;
  231. }
  232. 100% {
  233. opacity: 1;
  234. }
  235. }
  236. @keyframes fadeIn {
  237. 0% {
  238. opacity: 0;
  239. }
  240. 100% {
  241. opacity: 1;
  242. }
  243. }
  244. @-webkit-keyframes fadeOut {
  245. 0% {
  246. opacity: 1;
  247. }
  248. 100% {
  249. opacity: 0;
  250. }
  251. }
  252. @keyframes fadeOut {
  253. 0% {
  254. opacity: 1;
  255. }
  256. 100% {
  257. opacity: 0;
  258. }
  259. }
  260. p img {
  261. max-width: 100%;
  262. height: auto;
  263. }
  264. .mui-content > .mui-table-view:first-child {
  265. margin-top: 5px;
  266. }
  267. .mui-icon-clear {
  268. position: absolute;
  269. right: 0;
  270. line-height: 40px;
  271. color: #999;
  272. font-size: 20px;
  273. }
  274. .Hides {
  275. display: none !important;
  276. }
  277. .SHOW {
  278. display: block !important;
  279. }
  280. #Appointtime {
  281. width: -webkit-calc(65% - 20px) !important;
  282. width: -moz-calc(65%-20px) !important;
  283. width: calc(65% - 20px) !important;
  284. float: none;
  285. }
  286. #Repairtime {
  287. width: -webkit-calc(65% - 20px) !important;
  288. width: -moz-calc(65%-20px) !important;
  289. width: calc(65% - 20px) !important;
  290. float: none;
  291. }
  292. .content-title {
  293. margin-bottom: 0;
  294. padding: 0 30px;
  295. }
  296. .mui-input-row label {
  297. line-height: normal !important;
  298. }
  299. .mui-input-row select {
  300. font-size: 14px;
  301. height: 40px !important;
  302. padding: 0;
  303. }
  304. #showZhuTiPickers {
  305. display: none;
  306. }
  307. .mui-radio input[type=radio] {
  308. top: 7px;
  309. }
  310. #userResult {
  311. width: 30% !important;
  312. }
  313. .QRaddOrder{
  314. display: none;
  315. }
  316. </style>
  317. </head>
  318. <body>
  319. <!--<header id="header" class="mui-bar mui-bar-nav new_head">
  320. <h1 class="mui-title new_head_title">我要投诉</h1>
  321. <button class="new_head_left mui-action-back mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left">
  322. <span class="mui-icon mui-icon-left-nav"></span>返回
  323. </button>
  324. <button class="new_head_right mui-btn mui-btn-blue mui-btn-link mui-pull-right"><span class="iconfont icon-unie644" style="font-size: 25px;"></span></button>
  325. </header>-->
  326. <!--<header id="header" class="mui-bar mui-bar-transparent">
  327. <h1 class="mui-title">导航栏</h1>
  328. </header>-->
  329. <div style="margin-top: 20px;">
  330. <p class="content-title">我的位置</p>
  331. <ul class="mui-table-view">
  332. <li class="mui-table-view-cell SDaddOrder" id='showLocation'>
  333. <div class="mui-input-row">
  334. <label class="label"><i class="iconfont ">&#xe61e;</i></label>
  335. <input type="text" id='Faulttypes' class="ui-alert type_con" placeholder="请选择位置" data-index="" readonly="readonly" />
  336. <input type="hidden" id="provinceCode" />
  337. <input type="hidden" id="cityCode" />
  338. <input type="hidden" id="proNameCode" />
  339. <a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
  340. </div>
  341. </li>
  342. <li class="mui-table-view-cell QRaddOrder">
  343. <div class="mui-input-row">
  344. <label class="label"><i class="iconfont ">&#xe61e;</i></label>
  345. <input type="text" id='QRFaulttypes' class="ui-alert type_con" placeholder="请选择位置" data-index="" readonly="readonly" />
  346. </div>
  347. </li>
  348. </ul>
  349. <p class="content-title">报修详情</p>
  350. </div>
  351. <div class="mui-content">
  352. <ul class="mui-table-view">
  353. <li class="mui-table-view-cell SDaddOrder" id="showBuildPicker">
  354. <div class="mui-input-row">
  355. <label class="label">报修地点:</label>
  356. <input type="text" id='buildName' class="ui-alert type_con" placeholder="请选择报修地点" data-index="" readonly="readonly" />
  357. <input type="hidden" id='buildCode' />
  358. <input type="hidden" id='floorCode' />
  359. <a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
  360. </div>
  361. </li>
  362. <li class="mui-table-view-cell QRaddOrder">
  363. <div class="mui-input-row">
  364. <label class="label">报修地点:</label>
  365. <input type="text" id='QRbuildName' class="ui-alert type_con" placeholder="请选择报修地点" data-index="" readonly="readonly" />
  366. </div>
  367. </li>
  368. <li class="mui-table-view-cell">
  369. <div class="mui-input-row">
  370. <label class="label">房间号:</label>
  371. <input type="text" id='repairoom' class="ui-alert type_con" placeholder="请填写房间号" />
  372. </div>
  373. </li>
  374. <li class="mui-table-view-cell" id="showProType">
  375. <div class="mui-input-row">
  376. <label class="label">项目类型:</label>
  377. <input type="text" id='ProTypename' class="ui-alert type_con" data-index="" readonly="readonly" />
  378. <input type="hidden" id='ProTypeId' />
  379. <!--<a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>-->
  380. </div>
  381. </li>
  382. <!--<li class="mui-table-view-cell" id="showZhuTiPicker">
  383. <div class="mui-input-row">
  384. <label class="label">报修地点:</label>
  385. <input type="text" id='Repairreplace' class="ui-alert type_con" data-index="" />
  386. </div>
  387. </li>-->
  388. <!--<li class="mui-table-view-cell" id="showTimePicker">
  389. <div class="mui-input-row">
  390. <label class="label">报修时间:</label>
  391. <input type="date" id='Repairtime' class="ui-alert type_con" data-index="" />
  392. <input type="text" id='Repairtime' class="ui-alert type_con" data-index="" readonly="readonly" />
  393. <span class="mui-icon mui-icon-clear mui-hidden Repairtime"></span>
  394. <a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
  395. </div>
  396. </li>-->
  397. <li class="mui-table-view-cell" id="showZhuTiPicker">
  398. <div class="mui-input-row">
  399. <label class="label">报修人:</label>
  400. <input type="text" id='Repairman' class="ui-alert type_con" placeholder="请填写报修人" />
  401. </div>
  402. </li>
  403. <li class="mui-table-view-cell">
  404. <div class="mui-input-row">
  405. <label class="label">联系方式:</label>
  406. <input type="tel" id="Contactway" placeholder="请填写联系电话">
  407. </div>
  408. </li>
  409. <!--<li class="mui-table-view-cell" id="showEquipname">
  410. <div class="mui-input-row">
  411. <label class="label">设备名称:</label>
  412. <input type="text" id='Equipname' class="ui-alert type_con" data-index="" readonly="readonly" />
  413. <a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
  414. </div>
  415. </li>-->
  416. <!--<li class="mui-table-view-cell" id="showFaulttype">
  417. <div class="mui-input-row">
  418. <label class="label">故障类型:</label>
  419. <input type="text" id='Faulttype' class="ui-alert type_con" data-index="" readonly="readonly" />
  420. <a href=""><span class="type_down mui-icon mui-icon-arrowdown mui-pull-right"></span></a>
  421. </div>
  422. </li>-->
  423. <li class="mui-table-view-cell">
  424. <div class="mui-input-row">
  425. <label class="label">故障说明:</label>
  426. <textarea class="ztext content" name="" id="Faultdescripe" rows="3" cols="" placeholder="请详细描述您的问题..."></textarea>
  427. </div>
  428. </li>
  429. <li class="mui-table-view-cell">
  430. <div class="mui-input-row">
  431. <label class="label">故障图片:</label>
  432. <div id="filePicker">
  433. <i class="iconfont">&#xe61a;</i>
  434. </div>
  435. <div id='image-list' class="row image-list">
  436. </div>
  437. </div>
  438. </li>
  439. <!--<li class="mui-table-view-cell">
  440. <div class="mui-input-row">
  441. <label class="label">预约时间:</label>
  442. <input type="date" id="Appointtime" placeholder="">
  443. <span class="mui-icon mui-icon-clear mui-hidden Appointtime"></span>
  444. </div>
  445. </li>-->
  446. <!--<li class="mui-table-view-cell baoMi">
  447. <div class="mui-input-row">
  448. <label class="label" style="width:42%;">指定维修人:</label>
  449. <div class="mui-input-row mui-radio mui-left radio_box">
  450. <label>否</label>
  451. <input type="radio" name="secret" checked="checked" value="1" />
  452. </div>
  453. <div class="mui-input-row mui-radio mui-left radio_box">
  454. <label>是</label>
  455. <input type="radio" name="secret" value="0" />
  456. </div>
  457. </div>
  458. </li>-->
  459. <!--<li class="mui-table-view-cell" id="showZhuTiPickers">
  460. <div class="mui-input-row">
  461. <label class="label">维修人:</label>
  462. <select class="mui-select" name="" id="Appointman">
  463. <option value="张三">张三</option>
  464. <option value="李四">李四</option>
  465. <option value="王五">王五</option>
  466. </select>
  467. </div>
  468. </li>-->
  469. <div style="padding: 20px;" class="btn-grop">
  470. <div>
  471. <button type="button" id="HY_add" class="mui-btn mui-btn-primary " style="width: 100%;">提交</button>
  472. </div>
  473. </div>
  474. </ul>
  475. </div>
  476. <script src="../layui/layui.js?v=1.1"></script>
  477. <script src="../js/jquery.min.js?v=1.1"></script>
  478. <script src="../js/mui.min.js?v=1.1"></script>
  479. <script src="../js/mui.picker.js?v=1.1"></script>
  480. <script src="../js/mui.picker.min.js?v=1.1"></script>
  481. <script src="../js/mui.poppicker.js?v=1.1"></script>
  482. <script src="../js/zepto.js?v=1.1"></script>
  483. <script src="../js/mui.zoom.js?v=1.1"></script>
  484. <script src="../js/mui.previewimage.js?v=1.1"></script>
  485. <script src="../Script/Common/huayi.config.js?v=1.1"></script>
  486. <script src="../Script/Common/huayi.http.js?v=1.1"></script>
  487. <script src="../js/webuploader/webuploader.min.js?v=1.1"></script>
  488. <!-- <script src="../js/city.data-3.js?v=1.1"></script>-->
  489. <!--<script src="../js/city.data.js?v=1.1"></script>-->
  490. <script type="text/javascript">
  491. //获取楼层信息
  492. var Loid = helper.request.queryString("id");
  493. mui.previewImage();
  494. var Faultpic;
  495. var Nid;
  496. //维修人
  497. // $(' input[name="secret"]').change(function() {
  498. // var val = $(this).val();
  499. // if(val == "1") {
  500. // $("#showZhuTiPickers").hide();
  501. // } else {
  502. // $("#showZhuTiPickers").show();
  503. // }
  504. // })
  505. if (Loid) {
  506. $('.QRaddOrder').show();
  507. $('.SDaddOrder').hide();
  508. $.ajax({
  509. type: "get",
  510. url: huayi.config.callcenter_url + 'equipmentapi/api/Equipment/gettreeinfo',
  511. async: false,
  512. data: {
  513. floorid: Loid
  514. },
  515. dataType: 'json',
  516. success: function(data) {
  517. if (data.state.toLowerCase() == "success") {
  518. $('#Faulttypes').val(data.data.provincename + " " + data.data.cityname + " " + data.data.projectname);
  519. $('#QRFaulttypes').val(data.data.provincename + " " + data.data.cityname + " " + data.data.projectname);
  520. $('#provinceCode').val(data.data.province);
  521. $('#cityCode').val(data.data.city);
  522. $('#proNameCode').val(data.data.projectid);
  523. $('#buildName').val(data.data.bulidname + " " + data.data.floorname);
  524. $('#QRbuildName').val(data.data.bulidname + " " + data.data.floorname);
  525. $('#buildCode').val(data.data.bulidid);
  526. $('#floorCode').val(data.data.floorid);
  527. $('#repairoom').val(data.data.repairoom);
  528. $('#ProTypename').val(data.data.protypename);
  529. $('#ProTypeId').val(data.data.property);
  530. localStorage.setItem("projectid", data.data.projectid); //项目信息存储到localStorage
  531. }
  532. }
  533. });
  534. }
  535. //报修时间
  536. //getFormatDate($('#Repairtime'));
  537. function getFormatDate() {
  538. var nowDate = new Date();
  539. var year = nowDate.getFullYear();
  540. var month = nowDate.getMonth() + 1 < 10 ? "0" + (nowDate.getMonth() + 1) : nowDate.getMonth() + 1;
  541. var date = nowDate.getDate() < 10 ? "0" + nowDate.getDate() : nowDate.getDate();
  542. var hour = nowDate.getHours() < 10 ? "0" + nowDate.getHours() : nowDate.getHours();
  543. var minute = nowDate.getMinutes() < 10 ? "0" + nowDate.getMinutes() : nowDate.getMinutes();
  544. var second = nowDate.getSeconds() < 10 ? "0" + nowDate.getSeconds() : nowDate.getSeconds();
  545. return year + "-" + month + "-" + date + " " + hour + ":" + minute + ":" + second;
  546. }
  547. //楼下拉
  548. var blildPicker, Adress = [];
  549. function getBuild() {
  550. Adress = [];
  551. $.ajax({
  552. type: "get",
  553. url: huayi.config.callcenter_url + 'equipmentapi/api/equipment/getaddresstree',
  554. async: false,
  555. data: {
  556. projectid: $('#proNameCode').val()
  557. },
  558. dataType: 'json',
  559. success: function(data) {
  560. var type_data = data.data;
  561. if (type_data != null && type_data.length > 0) {
  562. $(type_data).each(function(i, n) {
  563. var obj = {};
  564. obj.value = n.id;
  565. obj.text = n.name;
  566. if (n.entityJson != null && n.entityJson.length > 0) {
  567. var children2 = [];
  568. $(n.entityJson).each(function(j, k) {
  569. var obj2 = {};
  570. obj2.value = k.code;
  571. obj2.text = k.name;
  572. children2.push(obj2);
  573. })
  574. obj.children = children2;
  575. }
  576. Adress.push(obj);
  577. blildPicker.setData(Adress);
  578. })
  579. } else {
  580. //var obj = {};
  581. //obj.value = "";
  582. //obj.text = "暂无楼选择";
  583. //obj.children = [{
  584. // value: '',
  585. // text: '暂无楼层'
  586. //}];
  587. //Adress.push(obj);
  588. blildPicker.setData(Adress);
  589. }
  590. }
  591. });
  592. }
  593. //省市项目三级联动
  594. var cityData3 = [];
  595. $.ajax({
  596. type: "get",
  597. url: huayi.config.callcenter_url + 'equipmentapi/api/equipment/getprojecttree',
  598. async: false,
  599. data: {},
  600. dataType: 'json',
  601. success: function(data) {
  602. var key_data = data.data;
  603. $(key_data).each(function(i, n) {
  604. var obj1 = {};
  605. obj1.value = n.code;
  606. obj1.text = n.name;
  607. if (n.entityJson != null && n.entityJson.length > 0) {
  608. var children2 = [];
  609. $(n.entityJson).each(function(j, k) {
  610. var obj2 = {};
  611. obj2.value = k.code;
  612. obj2.text = k.name;
  613. children2.push(obj2);
  614. if (k.entityJson != null && k.entityJson.length > 0) {
  615. var children3 = [];
  616. $(k.entityJson).each(function(p, q) {
  617. var obj3 = {}
  618. obj3.value = q.code;
  619. obj3.text = q.name;
  620. obj3.protypeid = q.protypeid;
  621. obj3.protypename = q.protypename;
  622. children3.push(obj3);
  623. })
  624. obj2.children = children3;
  625. }
  626. })
  627. obj1.children = children2;
  628. }
  629. cityData3.push(obj1)
  630. })
  631. if (cityData3.length == 0) {
  632. $('#Faulttypes').attr("placeholder", "暂无数据");
  633. } else {
  634. $('#Faulttypes').attr("placeholder", "请选择位置");
  635. }
  636. }
  637. });
  638. //填充数据
  639. (function($, doc) {
  640. $.init();
  641. $.ready(function() {
  642. var _getParam = function(obj, param) {
  643. return obj[param] || '';
  644. };
  645. //位置
  646. var cityPicker3 = new $.PopPicker({
  647. layer: 3
  648. });
  649. // var zhuTiPicker_ = new $.PopPicker();
  650. cityPicker3.setData(cityData3);
  651. var showZhuTiPickerButton_ = doc.getElementById('showLocation');
  652. var zhuTiPicker_ = doc.getElementById('Faulttypes');
  653. showZhuTiPickerButton_.addEventListener('tap', function(event) {
  654. cityPicker3.show(function(items) {
  655. zhuTiPicker_.value = _getParam(items[0], 'text') + " " + _getParam(items[1], 'text') + " " + _getParam(
  656. items[2], 'text');
  657. zhuTiPicker_.setAttribute("data-index", _getParam(items[0], 'value') + " " + _getParam(items[1], 'value') +
  658. " " + _getParam(items[2], 'value'));
  659. doc.getElementById('provinceCode').value = _getParam(items[0], 'value');
  660. doc.getElementById('cityCode').value = _getParam(items[1], 'value');
  661. doc.getElementById('proNameCode').value = _getParam(items[2], 'value');
  662. doc.getElementById('ProTypeId').value = _getParam(items[2], 'protypeid');
  663. doc.getElementById('ProTypename').value = _getParam(items[2], 'protypename');
  664. doc.getElementById('buildName').value = "";
  665. doc.getElementById('buildCode').value = "";
  666. doc.getElementById('floorCode').value = "";
  667. getBuild();
  668. if (Adress.length == 0) {
  669. doc.getElementById('buildName').setAttribute("placeholder", "暂无数据");
  670. } else {
  671. doc.getElementById('buildName').setAttribute("placeholder", "请选择报修地点");
  672. }
  673. //返回 false 可以阻止选择框的关闭
  674. //return false;
  675. });
  676. }, false);
  677. //报修地点 楼
  678. blildPicker = new $.PopPicker({
  679. layer: 2
  680. });
  681. var ShowBuildPickerButton = doc.getElementById('showBuildPicker');
  682. var BuildResult = doc.getElementById('buildName');
  683. ShowBuildPickerButton.addEventListener('tap', function(event) {
  684. if (Adress.length > 0) {
  685. blildPicker.show(function(items) {
  686. BuildResult.value = (items[0].text ? items[0].text : "") + " " + (items[1].text ? items[1].text : "");
  687. doc.getElementById('buildCode').value = items[0].value ? items[0].value : "";
  688. doc.getElementById('floorCode').value = items[1].value ? items[1].value : "";
  689. //返回 false 可以阻止选择框的关闭
  690. //return false;
  691. });
  692. }
  693. }, false);
  694. })
  695. })(mui, document);
  696. //
  697. var uploader; //上传实例
  698. var applicationPath = window.applicationPath === "" ? "" : window.applicationPath || "../../";
  699. var $ = jQuery,
  700. $list = $('#image-list'),
  701. // 优化retina, 在retina下这个值是2
  702. ratio = window.devicePixelRatio || 1,
  703. // // 缩略图大小
  704. thumbnailWidth = 50 * ratio,
  705. thumbnailHeight = 50 * ratio;
  706. // Web Uploader实例
  707. //添加图片
  708. $(function() {
  709. if (uploader) {
  710. uploader.destroy();
  711. }
  712. uploader = WebUploader.create({
  713. // 自动上传。
  714. auto: true,
  715. // swf文件路径
  716. swf: '../js/webuploader/Uploader.swf',
  717. // 文件接收服务端。
  718. server: huayi.config.callcenter_url + 'fileserverapi/Api/Upload',
  719. // 选择文件的按钮。可选。
  720. // 内部根据当前运行是创建,可能是input元素,也可能是flash.
  721. pick: '#filePicker',
  722. // 图片数量限制
  723. fileNumLimit: 4,
  724. formData: {
  725. uploadtype: "Works"
  726. },
  727. //可以重复上传
  728. duplicate: true,
  729. // 只允许选择文件,可选。
  730. accept: {
  731. title: 'Images',
  732. extensions: 'gif,jpg,jpeg,bmp,png',
  733. mimeTypes: 'image/*'
  734. },
  735. resize: false
  736. });
  737. //上传图片提示
  738. uploader.on('error', function(handler) {
  739. if (handler == "Q_EXCEED_NUM_LIMIT") {
  740. mui.toast("超出最大文件数");
  741. }
  742. });
  743. // 当有文件添加进来的时候
  744. uploader.on('fileQueued', function(file) {
  745. $('#image-list').addClass('SHOW');
  746. console.log(file);
  747. var $li = $(
  748. '<div id="' + file.id + '" class="file-item thumbnail">' +
  749. '<div class="image-close">X</div>' +
  750. '<img>' +
  751. '<div class="info">' + file.name + '</div>' +
  752. '</div>'
  753. ),
  754. $img = $li.find('img');
  755. $list.prepend($li);
  756. var IMGLIST = $(".thumbnail");
  757. $(".image-close").on('tap', function() {
  758. event.stopPropagation();
  759. $(this).parent().remove();
  760. file_num()
  761. });
  762. });
  763. // 文件上传成功,给item添加成功class, 用样式标记上传成功。
  764. uploader.on('uploadSuccess', function(file, response) {
  765. $.each(response.data, function(i, j) {
  766. var $img = $('#' + file.id).find('img');
  767. var img = j.fileurl;
  768. // console.log(img);
  769. $('#' + file.id).attr({
  770. 'data-filename': j.filename,
  771. 'data-fileext': j.fileext,
  772. 'data-filemd5': j.filemd5,
  773. 'data-filesize': j.filesize,
  774. 'data-filesmallurl': j.filesmallurl,
  775. 'data-fileurl': j.fileurl
  776. });
  777. uploader.makeThumb(file, function(error, src) {
  778. if (error) {
  779. $img.replaceWith('<span class="Phone">' + file.ext + '</span>');
  780. return;
  781. }
  782. $img.attr('src', j.fileurl);
  783. $img.attr('data-preview-src', '');
  784. $img.addClass('image-item');
  785. $img.attr('data-preview-group', "1");
  786. }, thumbnailWidth, thumbnailHeight);
  787. });
  788. $('#' + file.id).addClass('upload-state-done');
  789. file_num()
  790. });
  791. // 文件上传失败,现实上传出错。
  792. uploader.on('uploadError', function(file) {
  793. var $li = $('#' + file.id),
  794. $error = $li.find('div.error');
  795. // 避免重复创建
  796. if (!$error.length) {
  797. $error = $('<div class="error"></div>').appendTo($li);
  798. }
  799. $error.text('上传失败');
  800. });
  801. // 完成上传完了,成功或者失败,先删除进度条。
  802. uploader.on('uploadComplete', function(file) {
  803. $('#' + file.id).find('.progress').remove();
  804. });
  805. });
  806. function file_num() {
  807. var arr = [];
  808. $('#image-list').find('.thumbnail').each(function(j, m) {
  809. var obj = {
  810. 'filename': $(m).attr("data-filename"),
  811. 'fileext': $(m).attr("data-fileext"),
  812. 'filemd5': $(m).attr("data-filemd5"),
  813. 'filesize': $(m).attr("data-filesize"),
  814. 'filesmallurl': $(m).attr("data-filesmallurl"),
  815. 'fileurl': $(m).attr("data-fileurl")
  816. }
  817. arr.push(obj)
  818. })
  819. window['Faultpic'] = arr;
  820. }
  821. $("#HY_add").on('tap', function() {
  822. if (!$("#proNameCode").val()) {
  823. mui.alert('位置不能为空!');
  824. return;
  825. }
  826. if (!$("#floorCode").val()) {
  827. mui.alert('请选择报修地点!');
  828. return;
  829. }
  830. if (!$("#ProTypename").val()) {
  831. mui.alert('请选择项目类型!');
  832. return;
  833. }
  834. if (!$("#Repairman").val()) {
  835. mui.alert('请输入报修人!');
  836. return;
  837. }
  838. if (!$("#Contactway").val()) {
  839. mui.alert('请输入联系方式!');
  840. return;
  841. }
  842. mui.confirm('是否要提交工单', '温馨提示', ['否', '是'], function(e) {
  843. if (e.index == 1) {
  844. Submit();
  845. }
  846. });
  847. })
  848. //时间删除
  849. // $("#Appointtime").focus(function() {
  850. // $('.Appointtime').removeClass('mui-hidden');
  851. // });
  852. // $('.Appointtime').on('tap', function() {
  853. // $("#Appointtime").val('');
  854. // $(this).addClass('mui-hidden');
  855. // })
  856. // $("#Repairtime").focus(function() {
  857. // $('.Repairtime').removeClass('mui-hidden');
  858. // });
  859. // $('.Repairtime').on('tap', function() {
  860. // $("#Repairtime").val('');
  861. // $(this).addClass('mui-hidden');
  862. // })
  863. //提交工单
  864. function Submit() {
  865. $.ajax({
  866. type: "post",
  867. url: huayi.config.callcenter_url + 'equipmentapi/api/worepairbase/add',
  868. async: true,
  869. data: {
  870. // openid: "oKOqcv31fh76rtNmJDjKc39oIsfA",
  871. channel: 4, //微信
  872. province: $('#provinceCode').val(), //省
  873. city: $('#cityCode').val(), //市
  874. projectid: $('#proNameCode').val(), //项目名称
  875. protypeid: $('#ProTypeId').val(), //项目类型
  876. buildid: $('#buildCode').val(), //楼
  877. floorid: $('#floorCode').val(), //楼层
  878. repairreplace: $("#buildName").val(), //报修地点
  879. repairoom: $('#repairoom').val(), //房间号
  880. repairtime: getFormatDate(), //$("#Repairtime").val(), //报修时间
  881. repairman: $("#Repairman").val(), //报修人
  882. contactway: $("#Contactway").val(), //联系电话
  883. // faulttype: $("#Faulttype").val(), //故障类型
  884. faultdescripe: $("#Faultdescripe").val(),
  885. faultpic: Faultpic,
  886. // appointtime: $("#Appointtime").val(),
  887. // appointman: $("#Appointman").val(), //维修人
  888. // isappoint: $('input[name="secret"]:checked').val() //是否指定维修人 0否,1是
  889. },
  890. success: function(data) {
  891. var str = JSON.parse(data);
  892. if (str.state == "success") {
  893. mui.alert('投诉成功!');
  894. window.location.href = 'Workfinish.html';
  895. $('#Faulttypes').val(''); //位置
  896. $('#provinceCode').val(''); //省
  897. $('#cityCode').val(''); //市
  898. $('#proNameCode').val(''); //项目
  899. $('#buildCode').val(''); //楼
  900. $('#buildName').val(''), //楼 文本
  901. $('#floorCode').val(''); //楼层
  902. $('#repairoom').val(''); //房间号
  903. $('#ProTypename').val(''); //项目类型 文本
  904. $('#ProTypeId').val(''); //项目类型
  905. $("#Repairtime").val(''); //报修时间
  906. $("#Repairman").val(''); //报修人
  907. $("#Contactway").val(''); //联系电话
  908. // $("#Faulttype").val(''); //故障类型
  909. $("#Faultdescripe").text(''); //故障说明
  910. // $("#Appointtime").val('');
  911. // $("#Appointman").val('');//维修人
  912. // $('input[name="secret"][value="0"]').prop("checked", "checked");
  913. }
  914. }
  915. });
  916. }
  917. </script>
  918. </body>
  919. </html>