虞城12345_前端

Work-bianji.html 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  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. p img {
  108. max-width: 100%;
  109. height: auto;
  110. }
  111. .img-box {
  112. float: left;
  113. width: 20%;
  114. height: 60px;
  115. margin: 2%;
  116. text-align: center;
  117. position: relative;
  118. }
  119. .img-box img {
  120. width: 100%;
  121. height: 100%;
  122. }
  123. .image-list {
  124. display: none;
  125. overflow: hidden;
  126. }
  127. .mui-preview-image.mui-fullscreen {
  128. position: fixed;
  129. z-index: 20;
  130. background-color: #000;
  131. }
  132. .mui-preview-header,
  133. .mui-preview-footer {
  134. position: absolute;
  135. width: 100%;
  136. left: 0;
  137. z-index: 10;
  138. }
  139. .mui-preview-header {
  140. height: 44px;
  141. top: 0;
  142. }
  143. .mui-preview-footer {
  144. height: 50px;
  145. bottom: 0px;
  146. }
  147. .mui-preview-header .mui-preview-indicator {
  148. display: block;
  149. line-height: 25px;
  150. color: #fff;
  151. text-align: center;
  152. margin: 15px auto 4;
  153. width: 70px;
  154. background-color: rgba(0, 0, 0, 0.4);
  155. border-radius: 12px;
  156. font-size: 16px;
  157. }
  158. .mui-preview-image {
  159. display: none;
  160. -webkit-animation-duration: 0.5s;
  161. animation-duration: 0.5s;
  162. -webkit-animation-fill-mode: both;
  163. animation-fill-mode: both;
  164. }
  165. .mui-preview-image.mui-preview-in {
  166. -webkit-animation-name: fadeIn;
  167. animation-name: fadeIn;
  168. }
  169. .mui-preview-image.mui-preview-out {
  170. background: none;
  171. -webkit-animation-name: fadeOut;
  172. animation-name: fadeOut;
  173. }
  174. .mui-preview-image.mui-preview-out .mui-preview-header,
  175. .mui-preview-image.mui-preview-out .mui-preview-footer {
  176. display: none;
  177. }
  178. .mui-zoom-scroller {
  179. position: absolute;
  180. display: -webkit-box;
  181. display: -webkit-flex;
  182. display: flex;
  183. -webkit-box-align: center;
  184. -webkit-align-items: center;
  185. align-items: center;
  186. -webkit-box-pack: center;
  187. -webkit-justify-content: center;
  188. justify-content: center;
  189. left: 0;
  190. right: 0;
  191. bottom: 0;
  192. top: 0;
  193. width: 100%;
  194. height: 100%;
  195. margin: 0;
  196. -webkit-backface-visibility: hidden;
  197. }
  198. .mui-zoom {
  199. -webkit-transform-style: preserve-3d;
  200. transform-style: preserve-3d;
  201. }
  202. .mui-slider .mui-slider-group .mui-slider-item img {
  203. width: auto;
  204. height: auto;
  205. max-width: 100%;
  206. max-height: 100%;
  207. }
  208. .mui-android-4-1 .mui-slider .mui-slider-group .mui-slider-item img {
  209. width: 100%;
  210. }
  211. .mui-android-4-1 .mui-slider.mui-preview-image .mui-slider-group .mui-slider-item {
  212. display: inline-table;
  213. }
  214. .mui-android-4-1 .mui-slider.mui-preview-image .mui-zoom-scroller img {
  215. display: table-cell;
  216. vertical-align: middle;
  217. }
  218. .mui-preview-loading {
  219. position: absolute;
  220. width: 100%;
  221. height: 100%;
  222. top: 0;
  223. left: 0;
  224. display: none;
  225. }
  226. .mui-preview-loading.mui-active {
  227. display: block;
  228. }
  229. .mui-preview-loading .mui-spinner-white {
  230. position: absolute;
  231. top: 50%;
  232. left: 50%;
  233. margin-left: -25px;
  234. margin-top: -25px;
  235. height: 50px;
  236. width: 50px;
  237. }
  238. .mui-preview-image img.mui-transitioning {
  239. -webkit-transition: -webkit-transform 0.5s ease, opacity 0.5s ease;
  240. transition: transform 0.5s ease, opacity 0.5s ease;
  241. }
  242. @-webkit-keyframes fadeIn {
  243. 0% {
  244. opacity: 0;
  245. }
  246. 100% {
  247. opacity: 1;
  248. }
  249. }
  250. @keyframes fadeIn {
  251. 0% {
  252. opacity: 0;
  253. }
  254. 100% {
  255. opacity: 1;
  256. }
  257. }
  258. @-webkit-keyframes fadeOut {
  259. 0% {
  260. opacity: 1;
  261. }
  262. 100% {
  263. opacity: 0;
  264. }
  265. }
  266. @keyframes fadeOut {
  267. 0% {
  268. opacity: 1;
  269. }
  270. 100% {
  271. opacity: 0;
  272. }
  273. }
  274. p img {
  275. max-width: 100%;
  276. height: auto;
  277. }
  278. .delcoin{
  279. position: absolute;
  280. right: -5px;
  281. top: -5px;
  282. color: #FF0000;
  283. font-size: 26px;
  284. }
  285. </style>
  286. </head>
  287. <body>
  288. <header class="mui-bar mui-bar-nav " style="padding-right: 15px;height: 50px;color: #fff;">
  289. <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" style="color: #fff;"></a>
  290. <h1 class="mui-center mui-title" style="color:#fff;">编辑工单</h1>
  291. </header>
  292. <div class="mui-content">
  293. <ul class="mui-table-view">
  294. <li class="mui-table-view-cell">
  295. <div class="mui-input-row">
  296. <label class="label">保密要求:</label>
  297. <div class="mui-input-row mui-radio mui-left radio_box">
  298. <label>保密</label>
  299. <input type="radio" type="radio" name="secret" value="1" />
  300. </div>
  301. <div class="mui-input-row mui-radio mui-left radio_box">
  302. <label>公开</label>
  303. <input type="radio" type="radio" name="secret" value="0" />
  304. </div>
  305. </div>
  306. </li>
  307. <li class="mui-table-view-cell">
  308. <div class="mui-input-row">
  309. <label class="label">紧急程度:</label>
  310. <div class="mui-input-row mui-radio mui-left radio_box">
  311. <label>普通</label>
  312. <input type="radio" type="radio" name="jinji" value="1" />
  313. </div>
  314. <div class="mui-input-row mui-radio mui-left radio_box">
  315. <label>紧急</label>
  316. <input type="radio" type="radio" name="jinji" value="2" />
  317. </div>
  318. </div>
  319. </li>
  320. <li class="mui-table-view-cell" id="showUserPicker">
  321. <div class=" mui-input-row mui-select">
  322. <label class="label">诉求类型:</label>
  323. <!--<input type="text" id='userResult' class="ui-alert type_con" data-index="" readonly="readonly" />-->
  324. <select name="" id="userResult">
  325. </select>
  326. </div>
  327. </li>
  328. <li class="mui-table-view-cell">
  329. <div class="mui-input-row">
  330. <label class="label">诉求主题:</label>
  331. <input type="text" id="title" placeholder="请填写您的诉求主题">
  332. </div>
  333. </li>
  334. <li class="mui-table-view-cell">
  335. <div class="mui-input-row">
  336. <label class="label">内容:</label>
  337. <textarea class="ztext content size-14" name="" id="textarea" rows="3" cols="" placeholder="请详细描述您的问题和建议..."></textarea>
  338. </div>
  339. </li>
  340. <li class="mui-table-view-cell">
  341. <div class="mui-input-row">
  342. <label class="label">投诉地址:</label>
  343. <input type="text" id="AreaName" placeholder="请填写您的称呼">
  344. </div>
  345. </li>
  346. <li class="mui-table-view-cell">
  347. <div class="mui-input-row">
  348. <label class="label">投诉人:</label>
  349. <input type="text" id="name" placeholder="请填写您的称呼">
  350. </div>
  351. </li>
  352. <li class="mui-table-view-cell">
  353. <div class="mui-input-row">
  354. <label class="label">联系电话:</label>
  355. <input type="text" id="phone" placeholder="请填写联系电话">
  356. </div>
  357. </li>
  358. <!--<li class="mui-table-view-cell" style="padding-bottom: 20px;">
  359. <div id='image-list' class="row image-list"></div>
  360. </li>-->
  361. </ul>
  362. <p class="action">
  363. <i class="iconfont icon-gantanhao" style="margin-right: 5px;font-size: 20px;vertical-align: middle;"></i>
  364. <span style="color: #f81737;">以上内容都为必填内容,请如实填写</span>
  365. </p>
  366. <!--<button type="button" class="mui-btn mui-btn-primary mui-btn-block block_button">提交</button>-->
  367. <div style="padding: 10px;">
  368. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block block_button submit">提交</button>
  369. </div>
  370. </div>
  371. <script src="../js/mui.min.js?"></script>
  372. <script src="../js/mui.picker.js"></script>
  373. <script src="../js/mui.poppicker.js"></script>
  374. <script src="../js/zepto.js"></script>
  375. <script src="../js/huayi.config.js"></script>
  376. <script src="../js/mui.zoom.js"></script>
  377. <script src="../js/mui.previewimage.js"></script>
  378. <script type="text/javascript">
  379. mui.init({
  380. swipeBack: false,
  381. })
  382. mui.previewImage();
  383. mui.plusReady(function() {
  384. var wv = plus.webview.currentWebview();
  385. var vText = wv.token;
  386. var name = wv.name;
  387. if(name) {
  388. Select();
  389. $.ajax({
  390. type: "get",
  391. url: huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder',
  392. async: false,
  393. data: {
  394. workorderid: name,
  395. "token": vText
  396. },
  397. dataType: 'json',
  398. success: function(result) {
  399. if(result.state.toLowerCase() == "success") {
  400. var Data = result.data.data;
  401. $("#name").val(Data[0].F_CusName);
  402. $("#AreaName").val(Data[0].AreaName + Data[0].F_SourceAddress);
  403. $("#phone").val(Data[0].F_CusPhone);
  404. $("#title").val(Data[0].F_ComTitle);
  405. $('.content').val(Data[0].F_ComContent);
  406. $("#userResult").val(Data[0].F_InfoType + '');
  407. $(' input[name="secret"][value="' + Data[0].F_IsProtect + '"]').prop("checked", "checked");
  408. $(' input[name="jinji"][value="' + Data[0].F_Level + '"]').prop("checked", "checked");
  409. //图片展示
  410. // if(Data[0].File) {
  411. // $(Data[0].File).each(function(i, n) {
  412. //// n.F_FileType == '.jpg' &&
  413. // if(n.F_FileType == '.png') {
  414. // alert(JSON.stringify(Data[0].File))
  415. // $('<div class="img-box">'+
  416. // '<span class="delcoin">x</span>'+
  417. // '<img src="' + n.F_FileUrl +
  418. // '" alt="" class="image-item" data-preview-src="" data-preview-group="1" /><div>').appendTo("#image-list");
  419. // $(".image-list").show();
  420. // } else if(n.F_FileType == '.docx') {
  421. // mui.toast('猜猜我是谁')
  422. // }
  423. // })
  424. // }
  425. }
  426. }
  427. });
  428. }
  429. $(".delcoin").on("tap",function(){
  430. $(this).parent(".img-box").hide();
  431. });
  432. //提交按钮
  433. $('.submit').on('tap', function() {
  434. if($('#name').val() == '') {
  435. mui.alert('请输入姓名!')
  436. } else if($('#phone').val() == '') {
  437. mui.alert('请输入联系电话!')
  438. } else if($('#title').val() == '') {
  439. mui.alert('请输入诉求主题!')
  440. } else if($('.content').val() == '') {
  441. mui.alert('请输入诉求内容!')
  442. } else {
  443. Submit()
  444. }
  445. })
  446. function Submit() {
  447. $.ajax({
  448. type: "post",
  449. url: huayi.config.callcenter_url + 'WorkOrder/EditWorkOrder',
  450. async: true,
  451. data: {
  452. workorderid: name,
  453. isprotect: $('input[name="secret"]:checked').val(), //(0普通1保密)
  454. level: $('input[name="jinji"]:checked').val(), //=(1普通2紧急)
  455. content: $('.content').val(), //投诉内容
  456. cusname: $('#name').val(), //投诉人姓名
  457. cusphone: $('#phone').val(), //投诉人电话
  458. sourceaddress: $('#AreaName').val(), //详细地址
  459. type: $("#userResult").val(), //类型
  460. title: $("#title").val(),
  461. issubmit: 1, //=(0保存1保存并提交)
  462. token: vText
  463. },
  464. success: function(data) {
  465. var str = JSON.parse(data);
  466. if(str.state.toLowerCase() == "success") {
  467. mui.toast('修改成功!');
  468. var wobj = plus.webview.getWebviewById("WorkDetails");
  469. wobj.reload(true);
  470. }
  471. }
  472. });
  473. }
  474. function Select() {
  475. //工单类型
  476. $.ajax({
  477. type: "get",
  478. url: huayi.config.callcenter_url + 'Dictionary/GetDicValueListById?',
  479. async: false,
  480. data: {
  481. token: vText,
  482. id: 2
  483. },
  484. dataType: 'json',
  485. success: function(data) {
  486. var type_data = data.data;
  487. $(type_data).each(function(i, n) {
  488. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo("#userResult");
  489. })
  490. }
  491. });
  492. }
  493. });
  494. </script>
  495. </body>
  496. </html>