虞城12345_前端

Work-ljbanli.html 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!doctype html>
  2. <html lang="en" class="feedback">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  6. <title>问题反馈</title>
  7. <link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
  8. <link href="../css/feedback-page.css" rel="stylesheet" />
  9. <style>
  10. p {
  11. font-size: 16px;
  12. color: #fe6604;
  13. }
  14. .mui-bar-nav {
  15. background-color: #00a1cb;
  16. color: #fff!important;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <header class="mui-bar mui-bar-nav" style="">
  22. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  23. <h1 class="mui-title" style="color: #fff;">办理工单</h1>
  24. </header>
  25. <div class="mui-content">
  26. <p>办理人(必填)</p>
  27. <div class="mui-input-row">
  28. <input id='contact' type="text" class="mui-input-clear contact" />
  29. </div>
  30. <p>办理内容(必填)</p>
  31. <div class="row mui-input-row">
  32. <textarea id='question' class="mui-input-clear question" placeholder="请详细描述你的问题和意见..."></textarea>
  33. </div>
  34. <div class="feedback">
  35. <p>添加图片(选填,提供问题截图,单张20M以下,最多上传5张)</p>
  36. <div id='image-list' class="row image-list"></div>
  37. </div>
  38. <div class="" style="padding: 10px;">
  39. <br />
  40. <button id="submit" type="button" class="mui-btn mui-btn-block mui-btn-primary submit">办理</button>
  41. </div>
  42. </div>
  43. <script src="../js/huayi.config.js"></script>
  44. <script src="../js/zepto.js"></script>
  45. <script src="../js/mui.min.js"></script>
  46. <script src="../js/feedback-page.js"></script>
  47. <script type="text/javascript">
  48. mui.init(
  49. );
  50. mui.plusReady(function() {
  51. var wv = plus.webview.currentWebview();
  52. var vText = wv.name;
  53. var token = wv.token;
  54. var Str = '';
  55. var str_ary;
  56. document.getElementById("submit").addEventListener('tap', function() {
  57. var username = $("#contact").val();
  58. var question = $("#question").val();
  59. $(".image-box").each(function(i, n) {
  60. var a = $(n).attr("indexs");
  61. if(a) {
  62. Str += a + ',';
  63. }
  64. });
  65. str_ary = Str.substring(0, Str.length - 1);
  66. // alert(str_ary);
  67. if(!username) {
  68. plus.nativeUI.toast('输入办理人');
  69. } else if(!question) {
  70. plus.nativeUI.toast('输入内容');
  71. } else{
  72. mui.ajax(huayi.config.callcenter_url + 'WorkOrder/DealWorkOrder', {
  73. data: {
  74. workorderid: vText,
  75. dealman: username, //办理人
  76. result: question, //办理内容
  77. state: 1,
  78. files: str_ary,
  79. token: token
  80. },
  81. dataType: 'json', //服务器返回json格式数据
  82. type: 'post', //HTTP请求类型
  83. timeout: 10000, //超时时间设置为10秒;
  84. success: function(data) {
  85. var btnArray = ['否', '是'];
  86. mui.confirm('是否办理工单', '提示', btnArray, function(e) {
  87. if(e.index == 1) {
  88. plus.nativeUI.toast('办理成功');
  89. // 页面跳转1
  90. var wobj = plus.webview.getWebviewById("Work-list");
  91. wobj.reload(true);
  92. // 页面跳转2
  93. // var isdeal = 0;
  94. // var nwaiting = plus.nativeUI.showWaiting();
  95. // webviewShow = plus.webview.create("Work-list.html?isdeal="+isdeal); //后台创建webview并打开show.html
  96. // webviewShow.addEventListener("loaded", function() { //注册新webview的载入完成事件
  97. // nwaiting.close(); //新webview的载入完毕后关闭等待框
  98. // webviewShow.show("slide-in-right", 300); //把新webview窗体显示出来,显示动画效果为速度300毫秒的右侧移入动画
  99. //
  100. // }, false);
  101. // 页面跳转3
  102. // var isdeal = 0;
  103. // mui.openWindow({
  104. // id: 'Work-list',
  105. // url: 'Work-list.html',
  106. // show: {
  107. // aniShow: 'pop-in'
  108. // },
  109. // styles: {
  110. // popGesture: 'hide'
  111. // },
  112. // waiting: {
  113. // autoShow: true
  114. // },
  115. // extras: {
  116. // isdeal: isdeal,
  117. //
  118. // }
  119. // });
  120. $("#contact").val("");
  121. $("#question").val("");
  122. } else {
  123. plus.nativeUI.toast('取消办理');
  124. }
  125. })
  126. },
  127. error: function(xhr, type, errorThrown) {
  128. }
  129. });
  130. }
  131. })
  132. })
  133. </script>
  134. </body>
  135. </html>