暫無描述

Work-bianji.html 9.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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 href="../css/mui.min.css" rel="stylesheet" />
  10. <!--<link rel="stylesheet" href="css/app.css" />-->
  11. <link href="../css/mui.picker.css" rel="stylesheet" />
  12. <link href="../css/mui.poppicker.css" rel="stylesheet" />
  13. <link rel="stylesheet" href="css/iconfont.css" />
  14. <link rel="stylesheet" href="css/inits.css" />
  15. <style>
  16. body{
  17. font-size: 14px;
  18. }
  19. .mui-bar-popover {
  20. width: 30%;
  21. }
  22. .mui-popover.mui-bar-popover .mui-table-view {
  23. width: 100%;
  24. }
  25. .mui-table-view .mui-table-view-cell>a:not(.mui-btn) {
  26. text-align: center;
  27. }
  28. .mui-table-view-cell {
  29. padding: 1px 15px!important;
  30. }
  31. .san {
  32. font-size: 14px;
  33. margin-right: 5px
  34. }
  35. .nav_a {
  36. border-right: 1px solid #ccc;
  37. }
  38. .radio_box {
  39. display: inline-block;
  40. }
  41. .mui-radio input[type=radio]:before {
  42. font-size: 20px;
  43. vertical-align: middle;
  44. }
  45. .mui-radio.mui-left input[type=radio] {
  46. line-height: 24px!important;
  47. }
  48. .mui-radio.mui-left label {
  49. padding-right: 1px!important;
  50. padding-left: 51px!important;
  51. }
  52. .ztext {
  53. width: 100%;
  54. margin: 0;
  55. border: 0;
  56. }
  57. .action {
  58. padding: 5px 15px;
  59. }
  60. .type_down {
  61. float: right!important;
  62. display: inline-block!important;
  63. vertical-align: middle!important;
  64. line-height: 42px;
  65. }
  66. .type_con {
  67. width: 55%!important;
  68. float: left!important;
  69. vertical-align: middle!important;
  70. display: inline-block!important;
  71. padding: 10px 0!important;
  72. }
  73. .label {
  74. width: 30%!important;
  75. padding: 11px 0px!important;
  76. }
  77. .get_yzm {
  78. padding: 5px!important;
  79. width: auto!important;
  80. }
  81. .yzm_con {
  82. float: left!important;
  83. width: 40%!important;
  84. }
  85. .mui-bar-nav {
  86. background-color: #00a1cb;
  87. }
  88. .mui-input-row label {
  89. text-align: -webkit-right;
  90. }
  91. .mui-input-row{
  92. font-size: 14px;
  93. }
  94. .mui-btn-block {
  95. padding: 10px;
  96. width: 100%;
  97. }
  98. .mui-input-row select {
  99. font-size: 14px;
  100. }
  101. .size-14{
  102. font-size: 14px;
  103. }
  104. input{
  105. font-size: 14px;
  106. }
  107. </style>
  108. </head>
  109. <body>
  110. <header class="mui-bar mui-bar-nav " style="padding-right: 15px;height: 50px;color: #fff;">
  111. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  112. <h1 class="mui-center mui-title" style="color:#fff;">编辑工单</h1>
  113. </header>
  114. <div class="mui-content">
  115. <ul class="mui-table-view">
  116. <li class="mui-table-view-cell">
  117. <div class="mui-input-row">
  118. <label class="label">保密要求:</label>
  119. <div class="mui-input-row mui-radio mui-left radio_box">
  120. <label>保密</label>
  121. <input type="radio" type="radio" name="secret" value="1" />
  122. </div>
  123. <div class="mui-input-row mui-radio mui-left radio_box">
  124. <label>公开</label>
  125. <input type="radio" type="radio" name="secret" value="0" />
  126. </div>
  127. </div>
  128. </li>
  129. <li class="mui-table-view-cell">
  130. <div class="mui-input-row">
  131. <label class="label">紧急程度:</label>
  132. <div class="mui-input-row mui-radio mui-left radio_box">
  133. <label>普通</label>
  134. <input type="radio" type="radio" name="jinji" value="1" />
  135. </div>
  136. <div class="mui-input-row mui-radio mui-left radio_box">
  137. <label>紧急</label>
  138. <input type="radio" type="radio" name="jinji" value="2" />
  139. </div>
  140. </div>
  141. </li>
  142. <li class="mui-table-view-cell" id="showUserPicker">
  143. <div class=" mui-input-row mui-select">
  144. <label class="label">诉求类型:</label>
  145. <!--<input type="text" id='userResult' class="ui-alert type_con" data-index="" readonly="readonly" />-->
  146. <select name="" id="userResult">
  147. </select>
  148. </div>
  149. </li>
  150. <li class="mui-table-view-cell">
  151. <div class="mui-input-row">
  152. <label class="label">诉求主题:</label>
  153. <input type="text" id="title" placeholder="请填写您的诉求主题">
  154. </div>
  155. </li>
  156. <li class="mui-table-view-cell">
  157. <div class="mui-input-row">
  158. <label class="label">内容:</label>
  159. <textarea class="ztext content size-14" name="" id="textarea" rows="3" cols="" placeholder="请详细描述您的问题和建议..."></textarea>
  160. </div>
  161. </li>
  162. <li class="mui-table-view-cell">
  163. <div class="mui-input-row">
  164. <label class="label">联系人:</label>
  165. <input type="text" id="name" placeholder="请填写您的称呼">
  166. </div>
  167. </li>
  168. <li class="mui-table-view-cell">
  169. <div class="mui-input-row">
  170. <label class="label">联系电话:</label>
  171. <input type="text" id="phone" placeholder="请填写联系电话">
  172. </div>
  173. </li>
  174. </ul>
  175. <p class="action">
  176. <i class="iconfont icon-gantanhao" style="margin-right: 5px;font-size: 20px;vertical-align: middle;"></i>
  177. <span style="color: #f81737;">以上内容都为必填内容,请如实填写</span>
  178. </p>
  179. <!--<button type="button" class="mui-btn mui-btn-primary mui-btn-block block_button">提交</button>-->
  180. <div style="padding: 10px;">
  181. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block block_button submit">提交</button>
  182. </div>
  183. </div>
  184. <script src="../js/mui.min.js?"></script>
  185. <script src="../js/mui.picker.js"></script>
  186. <script src="../js/mui.poppicker.js"></script>
  187. <script src="../js/zepto.js"></script>
  188. <script src="../js/huayi.config.js"></script>
  189. <script type="text/javascript">
  190. mui.init({
  191. swipeBack: false,
  192. })
  193. mui.plusReady(function() {
  194. var wv = plus.webview.currentWebview();
  195. var vText = wv.token;
  196. var name = wv.name;
  197. if(name) {
  198. Select();
  199. $.ajax({
  200. type: "get",
  201. url: huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder',
  202. async: false,
  203. data: {
  204. workorderid: name,
  205. "token": vText
  206. },
  207. dataType: 'json',
  208. success: function(result) {
  209. if(result.state.toLowerCase() == "success") {
  210. var Data = result.data.data;
  211. $("#name").val(Data[0].F_CusName);
  212. $("#phone").val(Data[0].F_CusPhone);
  213. $("#title").val(Data[0].F_ComTitle);
  214. $('.content').val(Data[0].F_ComContent);
  215. $("#userResult").val(Data[0].F_InfoType + '');
  216. $(' input[name="secret"][value="' + Data[0].F_IsProtect + '"]').prop("checked", "checked");
  217. $(' input[name="jinji"][value="' + Data[0].F_Level + '"]').prop("checked", "checked");
  218. }
  219. }
  220. });
  221. }
  222. //提交按钮
  223. $('.submit').on('tap', function() {
  224. if($('#name').val() == '') {
  225. mui.alert('请输入姓名!')
  226. } else if($('#phone').val() == '') {
  227. mui.alert('请输入联系电话!')
  228. } else if($('#title').val() == '') {
  229. mui.alert('请输入诉求主题!')
  230. } else if($('.content').val() == '') {
  231. mui.alert('请输入诉求内容!')
  232. } else {
  233. Submit()
  234. }
  235. })
  236. function Submit() {
  237. $.ajax({
  238. type: "post",
  239. url: huayi.config.callcenter_url + 'WorkOrder/EditWorkOrder',
  240. async: true,
  241. data: {
  242. workorderid: name,
  243. isprotect: $('input[name="secret"]:checked').val(), //(0普通1保密)
  244. level: $('input[name="jinji"]:checked').val(), //=(1普通2紧急)
  245. content: $('.content').val(), //投诉内容
  246. cusname: $('#name').val(), //投诉人姓名
  247. cusphone: $('#phone').val(), //投诉人电话
  248. sourceaddress: $('#detail_address').val(), //详细地址
  249. type: $("#userResult").val(),//类型
  250. title: $("#title").val(),
  251. issubmit: 1, //=(0保存1保存并提交)
  252. token: vText
  253. },
  254. success: function(data) {
  255. var str = JSON.parse(data);
  256. if(str.state.toLowerCase() == "success") {
  257. mui.toast('修改成功!');
  258. // $("#name").val('');
  259. // $("#phone").val('');
  260. // $("#title").val('');
  261. // $(".content").val('');
  262. // $("#cityResult3").val('');
  263. // $("#zhuTiResult").val('');
  264. // $("#userResult").val('');
  265. // $('#detail_address').val('');
  266. // $('input[name="secret"][value="0"]').prop("checked", "checked");
  267. var wobj = plus.webview.getWebviewById("WorkDetails");
  268. wobj.reload(true);
  269. }
  270. }
  271. });
  272. }
  273. function Select() {
  274. //工单类型
  275. $.ajax({
  276. type: "get",
  277. url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListById?',
  278. async: false,
  279. data: {
  280. token: vText,
  281. id: 2
  282. },
  283. dataType: 'json',
  284. success: function(data) {
  285. var type_data = data.data;
  286. $(type_data).each(function(i, n) {
  287. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo("#userResult");
  288. })
  289. }
  290. });
  291. }
  292. });
  293. </script>
  294. </body>
  295. </html>