Brak opisu

VisitorsCreate.html 41KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355
  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.css" rel="stylesheet" />
  10. <link href="../css/mui.picker.css" rel="stylesheet" />
  11. <link href="../css/mui.poppicker.css" rel="stylesheet" />
  12. <link href="../css/iconfont.css" rel="stylesheet" />
  13. <link href="css/details.css" rel="stylesheet" />
  14. <style>
  15. .pop_up_div8{
  16. display: none;
  17. }
  18. #order_source{
  19. margin-left: 10%;
  20. display: none;
  21. }
  22. </style>
  23. </head>
  24. <body>
  25. <div class="mui-nav" id="mNavbar">
  26. <a class="mui-icon mui-icon-arrowleft return"></a>
  27. 工单详情
  28. </div>
  29. <div class="mui-content" id="mContent">
  30. <ul class="mui-table-view mui-table-view-ul" style="margin-top: 0px;">
  31. <li class="mui-table-view-cell mui-table-view-li">
  32. <div class="mui-input-row">
  33. <label class="label font-color5">工单编号:</label>
  34. <div class="mui-radio mui-right radio_box">
  35. <label class="font-color6" id="Work_bianhao"></label>
  36. </div>
  37. </div>
  38. </li>
  39. <li class="mui-table-view-cell mui-table-view-li ">
  40. <div class="mui-input-row">
  41. <label class="label font-color5">客户姓名:</label>
  42. <div class="mui-radio mui-right radio_box">
  43. <label class="font-color6" id="customer"></label>
  44. </div>
  45. </div>
  46. </li>
  47. <li class="mui-table-view-cell mui-table-view-li">
  48. <div class="mui-input-row">
  49. <label class="label font-color5">联系电话:</label>
  50. <div class="mui-radio mui-right radio_box">
  51. <label class="font-color6" id="customerTel"></label>
  52. </div>
  53. </div>
  54. </li>
  55. <li class="mui-table-view-cell mui-table-view-li">
  56. <div class="mui-input-row">
  57. <label class="label font-color5">渠道类型:</label>
  58. <div class="mui-radio mui-right radio_box">
  59. <label class="font-color6" id="Work_areaname" data-index=""></label>
  60. </div>
  61. </div>
  62. </li>
  63. <li class="mui-table-view-cell mui-table-view-li">
  64. <div class="mui-input-row">
  65. <label class="label font-color5">详细地址:</label>
  66. <div class="mui-radio mui-right radio_box">
  67. <label class="font-color6" id="order_tower"></label>
  68. </div>
  69. </div>
  70. </li>
  71. <li class="mui-table-view-cell mui-table-view-cell-pmargin">
  72. <p id="Work_detail"></p>
  73. </li>
  74. </ul>
  75. <!--图片展示-->
  76. <div class="mui-table-view">
  77. <div id='image-list' class="row image-list"></div>
  78. </div>
  79. <ul class="mui-table-view mui-grid-view" style="display: none;">
  80. <h4 class="mui-ellipsis size-16 mui_btn1_tit">操作按钮:</h4>
  81. <div class="type1">
  82. <!--待派单-->
  83. <div class="mui_btn1 dispose1">
  84. <!--<li class=" mui-media mui-col-xs-3">
  85. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block redeploy">转派</button>
  86. </li>
  87. <li class=" mui-media mui-col-xs-3">
  88. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block finsh">完结</button>
  89. </li>-->
  90. </div>
  91. <!--待处理-->
  92. <div class="mui_btn1 dispose2">
  93. <li class=" mui-media mui-col-xs-3">
  94. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block edit">修改</button>
  95. </li>
  96. <li class=" mui-media mui-col-xs-3">
  97. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block sendback">退回</button>
  98. </li>
  99. <!--<li class=" mui-media mui-col-xs-3">
  100. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block delet">删除</button>
  101. </li>
  102. <li class=" mui-media mui-col-xs-3">
  103. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block deal">处理</button>
  104. </li>
  105. <li class=" mui-media mui-col-xs-3">
  106. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block btn_reply">回复</button>
  107. </li>-->
  108. </div>
  109. <!--已完成-->
  110. <div class="mui_btn1 dispose3">
  111. <li class=" mui-media mui-col-xs-3">
  112. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block edit">修改</button>
  113. </li>
  114. <li class=" mui-media mui-col-xs-3">
  115. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block delet">删除</button>
  116. </li>
  117. <!--<li class=" mui-media mui-col-xs-3">
  118. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block comment">评论</button>
  119. </li>-->
  120. </div>
  121. </div>
  122. <div class="type2">
  123. <!--待派单-->
  124. <div class="mui_btn1 dispose1">
  125. <li class=" mui-media mui-col-xs-3">
  126. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block rece">接单</button>
  127. </li>
  128. <li class=" mui-media mui-col-xs-3">
  129. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block sendback">退回</button>
  130. </li>
  131. </div>
  132. <!--待处理-->
  133. <div class="mui_btn1 dispose2">
  134. <li class=" mui-media mui-col-xs-3">
  135. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block disp">处理</button>
  136. </li>
  137. <li class=" mui-media mui-col-xs-3">
  138. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block allot">分配</button>
  139. </li>
  140. <li class=" mui-media mui-col-xs-3">
  141. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block abnormal">异常退回</button>
  142. </li>
  143. <li class=" mui-media mui-col-xs-3">
  144. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block postpone">申请延期</button>
  145. </li>
  146. <!--<li class=" mui-media mui-col-xs-3">
  147. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block btn_reply">回复</button>
  148. </li>-->
  149. </div>
  150. <!--已完成-->
  151. <!--<div class="mui_btn1 dispose3">
  152. <li class=" mui-media mui-col-xs-3">
  153. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block comment">评论</button>
  154. </li>
  155. </div>-->
  156. </div>
  157. <div class="type3">
  158. <!--待派单-->
  159. <div class="mui_btn1 dispose1">
  160. <li class=" mui-media mui-col-xs-3">
  161. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block receiving">审批</button>
  162. </li>
  163. </div>
  164. <div class="mui_btn1 dispose2">
  165. <li class=" mui-media mui-col-xs-3">
  166. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block approva">高层审批</button>
  167. </li>
  168. </div>
  169. </div>
  170. <div class="type4">
  171. <!--待派单-->
  172. <div class="mui_btn1 ">
  173. <li class=" mui-media mui-col-xs-3">
  174. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block receiving">接单</button>
  175. </li>
  176. </div>
  177. <!--待处理-->
  178. <div class="mui_btn1 dispose2">
  179. <li class=" mui-media mui-col-xs-3">
  180. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block daal">处理</button>
  181. </li>
  182. </div>
  183. </div>
  184. <div class="type5">
  185. <!--待处理-->
  186. <div class="mui_btn1 dispose3">
  187. <li class=" mui-media mui-col-xs-3">
  188. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block daal">催单</button>
  189. </li>
  190. </div>
  191. <!--待处理-->
  192. <div class="mui_btn1 dispose1">
  193. <li class=" mui-media mui-col-xs-3">
  194. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block daal">催单</button>
  195. </li>
  196. </div>
  197. <!--已完成-->
  198. <div class="mui_btn1 dispose2">
  199. <li class=" mui-media mui-col-xs-3">
  200. <button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block comment">评论</button>
  201. </li>
  202. </div>
  203. </div>
  204. </ul>
  205. <!--<div id="slider" class="mui-slider">
  206. <div id="sliderSegmentedControl" class="mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
  207. <a class="mui-control-item mui-active" href="#item1mobile" data-index="1">
  208. 工单跟踪
  209. </a>
  210. </div>
  211. <div class="mui-slider-group">
  212. <div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
  213. <ul class="mui-table-view folowlist" id="folow"></ul>
  214. </div>
  215. </div>
  216. </div>-->
  217. </div>
  218. <div class="WordID" style="display: none;"></div>
  219. <script src="../js/jquery.min.js"></script>
  220. <script src="js/details.js"></script>
  221. <script src="../Script/Common/huayi.config.js"></script>
  222. <script src="../Script/Common/huayi.http.js"></script>
  223. <script src="../js/mui.min.js"></script>
  224. <script src="../js/mui.picker.js"></script>
  225. <script src="../js/mui.poppicker.js"></script>
  226. <script src="js/city.data-3.js"></script>
  227. <script src="../js/mui.zoom.js"></script>
  228. <script src="../js/mui.previewimage.js"></script>
  229. <script>
  230. var id = helper.request.queryString("id");
  231. var itype = helper.request.queryString("itype");
  232. var state = helper.request.queryString("state");
  233. var isReply = helper.request.queryString("IsReply"); // 是否已回复 0 未回复 1已回复
  234. var openid = helper.cookies.get("openid");
  235. var UserType = helper.cookies.get("usertype");
  236. mui.previewImage();
  237. if(isReply == 0){
  238. $('.btn_reply').show();
  239. }
  240. if (UserType==-1) {
  241. $(".type1").hide();
  242. $(".type2").hide();
  243. $(".type3").show();
  244. $(".type4").hide();
  245. $(".type5").hide();
  246. } else if(UserType==0){
  247. $(".type1").show();
  248. $(".type2").hide();
  249. $(".type3").hide();
  250. $(".type4").hide();
  251. $(".type5").hide();
  252. $(".type6").hide();
  253. $(".type7").hide();
  254. $(".type8").hide();
  255. $(".type9").hide();
  256. }else if(UserType==1){
  257. $(".type1").hide();
  258. $(".type2").hide();
  259. $(".type3").show();
  260. $(".type4").hide();
  261. $(".type5").hide();
  262. }else if(UserType==2){
  263. $(".type1").hide();
  264. $(".type2").hide();
  265. $(".type3").show();
  266. $(".type4").hide();
  267. $(".type5").hide();
  268. $(".type6").hide();
  269. $(".type7").hide();
  270. $(".type8").hide();
  271. $(".type9").hide();
  272. }else if(UserType==3){
  273. $(".type1").hide();
  274. $(".type2").show();
  275. $(".type3").hide();
  276. $(".type4").hide();
  277. $(".type5").hide();
  278. $(".type6").hide();
  279. $(".type7").hide();
  280. $(".type8").hide();
  281. $(".type9").hide();
  282. }else if(UserType==4){
  283. $(".type1").show();
  284. $(".type2").hide();
  285. $(".type3").hide();
  286. $(".type4").hide();
  287. $(".type5").hide();
  288. $(".type6").hide();
  289. $(".type7").hide();
  290. $(".type8").hide();
  291. $(".type9").hide();
  292. }else if(UserType==5){
  293. $(".type1").show();
  294. $(".type2").hide();
  295. $(".type3").hide();
  296. $(".type4").hide();
  297. $(".type5").hide();
  298. $(".type6").hide();
  299. $(".type7").hide();
  300. $(".type8").hide();
  301. $(".type9").hide();
  302. }
  303. Ajax();
  304. // flow();
  305. // $("label:empty"=='').hide()
  306. //
  307. // var temp = $('.font-color6').text();
  308. // if (temp == '') {
  309. // $('.mui-radio').hide();
  310. // }else{
  311. // $('.mui-radio').show();
  312. // }
  313. // if($('.font-color6').is(':empty')){
  314. //
  315. // $('.mui-input-row').show();
  316. // alert(1111)
  317. // }
  318. // Remind();
  319. // Comment();
  320. //获取数据
  321. function Ajax() {
  322. $.ajax({
  323. url: huayi.config.callcenter_url + 'WxLogin/GetDetails',
  324. data: {
  325. id: id, //工单编号
  326. OpenId: openid, //微信openid,
  327. },
  328. async: true,
  329. dataType: 'json',
  330. type: 'get', //HTTP请求类型
  331. success: function(data) {
  332. if(data.state.toLowerCase() == "success") {
  333. var result = data.rows[0];
  334. if(result.Source == 0) {
  335. $("#source").hide();
  336. } else {
  337. $("#source").show();
  338. }
  339. var itype=result.F_State;
  340. //
  341. if (state==1) {
  342. // alert(state);
  343. $(".type1").hide();
  344. $(".type2").hide();
  345. $(".type3").hide();
  346. $(".type4").hide();
  347. $(".type5").hide();
  348. $(".type6").hide();
  349. $(".type7").hide();
  350. $(".type8").hide();
  351. $(".type9").hide();
  352. }
  353. if (state==11) {
  354. // alert(state);
  355. $(".type1").hide();
  356. $(".type2").hide();
  357. $(".type3").hide();
  358. $(".type4").hide();
  359. $(".type5").hide();
  360. $(".type6").hide();
  361. $(".type7").hide();
  362. $(".type8").hide();
  363. $(".type9").hide();
  364. }
  365. if(itype == 0) {
  366. $(".dispose1").hide();
  367. $(".dispose2").hide();
  368. }else if(itype == 1) {
  369. //alert(itype)
  370. $(".dispose1").hide();
  371. } else if(itype == 2) {
  372. $(".dispose2").hide();
  373. } else if(itype == 3) {
  374. $(".dispose3").hide();
  375. }else if(itype == 4) {
  376. $(".dispose2").hide();
  377. $(".dispose1").hide();
  378. }else if(itype == 5) {
  379. $(".dispose1").hide();
  380. $(".dispose2").hide();
  381. }else if(itype == 16) {
  382. $(".dispose1").hide();
  383. }
  384. if (result.GDLXName=="咨询") {
  385. $(".Work_lastDealDiv").hide(); //受理人
  386. $("#source").hide(); //投诉
  387. } else{
  388. $(".Work_lastDealDiv").show(); //受理人
  389. $("#source").show(); //投诉
  390. }
  391. var builName
  392. if (result.buildingname==null) {
  393. builName=""
  394. } else{
  395. builName=result.buildingname
  396. }
  397. var proName
  398. if (result.proname==null) {
  399. proName=""
  400. } else{
  401. proName=result.proname
  402. }
  403. var complain
  404. if (result.ComplaintDepartment==null) {
  405. complain=""
  406. } else{
  407. complain=result.ComplaintDepartment
  408. }
  409. $("#Work_bianhao").text(result.F_WorkOrderCode);
  410. $(".WordID").text(result.ID);
  411. $("#Work_classname").text(result.F_TypeName); //工单类型
  412. $("#section").text(result.F_DeptName); //部门
  413. $("#customer").text(result.F_CusName); //客户姓名
  414. $("#customerTel").text(result.F_CusPhone); //联系电话
  415. $("#Work_areaname").text(result.F_Canal); //公司名称
  416. $("#Work_areaname").attr('data-index',result.IsAdminSend);
  417. $("#order_tower").text(result.F_Salesman); //业务员
  418. $("#order_unit").text(result.F_SalesPhone); //单元号
  419. $("#Work_houseID").text(result.F_CreateBy); //添加人工号
  420. $("#Work_ownerRelations").text(result.F_DealBy); //处理人
  421. $("#Work_source").text(result.F_DealTime); //处理时间
  422. $(".Work_lastDealUser").text(result.F_DealContent); //处理内容
  423. $(".Work_last").text(result.F_DealResult); //处理结果
  424. $("#Work_workOrderID").text(result.F_DealReasons); //未处理原因
  425. $("#Work_workOrderID").text(result.F_IsVisit); //是否回访
  426. $("#Work_detail").text("问题描述:" + result.F_Description); //描述详情
  427. //图片展示
  428. if (data.FileUrl) {
  429. $(data.FileUrl).each(function (i, n) {
  430. if (n.F_FileType == '.jpg' || n.F_FileType == '.png') {
  431. debugger
  432. $('<div class="img-box"><img src="' + n.F_FileUrl + '" alt="" class="image-item" data-preview-src="" data-preview-group="1" /><div>').appendTo("#image-list");
  433. $(".image-list").show();
  434. }
  435. // else{
  436. // $('<div class="img-box"><a href="' + n.F_FileUrl + '" download="' + n.F_FileUrl + '"></a><div>').appendTo("#image-list");
  437. // }
  438. })
  439. }
  440. }
  441. },
  442. error: function(xhr, type, errorThrown) {
  443. //异常处理;
  444. }
  445. })
  446. }
  447. //跳转页面
  448. //修改
  449. $('.edit').on('tap', function() {
  450. window.location.href = "editWorkolder.html?id=" + id+'&itype='+itype;
  451. });
  452. //返回列表
  453. $('.return').on('tap', function() {
  454. window.location.href = "tourist.html"
  455. });
  456. //工单跟踪
  457. function flow() {
  458. $.ajax({
  459. url: huayi.config.callcenter_url + 'WxLogin/GetDetails',
  460. data: {
  461. id: id, //工单编号
  462. OpenId: openid, //微信openid,
  463. },
  464. async: true,
  465. dataType: 'json',
  466. type: 'get', //HTTP请求类型
  467. success: function(data) {
  468. if(data.state.toLowerCase() == "success") {
  469. if(data.total && data.total.length > 0) {
  470. $(data.total).each(function(i, n) {
  471. var str = '';
  472. if(n.F_OptType == 0){
  473. str = str + n.F_OptContent+"<br>";
  474. // alert(str)
  475. }
  476. if(n.F_OptType == 1){
  477. str = str + n.F_OptContent+"<br>";
  478. // alert(str)
  479. }
  480. if(n.F_OptType == 2){
  481. str = str + n.F_OptContent+"<br>";
  482. // alert(str)
  483. }
  484. if(n.F_OptType == 3){
  485. str = str + n.F_OptContent+"<br>";
  486. // alert(str)
  487. }
  488. if(n.F_OptType == 4){
  489. str = str + n.F_OptContent+"<br>";
  490. // alert(str)
  491. }
  492. if(n.F_OptType == 5){
  493. str = str + n.F_OptContent+"<br>";
  494. // alert(str)
  495. }
  496. if(n.F_OptType == 6){
  497. str = str + n.F_OptContent+"<br>";
  498. // alert(str)
  499. }
  500. if(n.F_OptType == 7){
  501. str = str + n.F_OptContent+"<br>";
  502. // alert(str)
  503. }
  504. if(n.F_OptType == 8){
  505. str = str + n.F_OptContent+"<br>";
  506. // alert(str)
  507. }
  508. if(n.F_OptType == 9){
  509. str = str + n.F_OptContent+"<br>";
  510. // alert(str)
  511. }
  512. if(n.F_OptType == 10){
  513. str = str + n.F_OptContent+"<br>";
  514. // alert(str)
  515. }
  516. if(n.F_OptType == 11){
  517. str = str + n.F_OptContent+"<br>";
  518. // alert(str)
  519. }
  520. if(n.F_OptType == 12){
  521. str = str + n.F_OptContent+"<br>";
  522. // alert(str)
  523. }
  524. if(n.F_OptType == 13){
  525. str = str + n.F_OptContent+"<br>";
  526. // alert(str)
  527. }
  528. if(n.F_OptType == 14){
  529. str = str + n.F_OptContent+"<br>";
  530. // alert(str)
  531. }
  532. if(n.F_OptType == 15){
  533. str = str + n.F_OptContent+"<br>";
  534. // alert(str)
  535. }
  536. if(n.F_OptType == 16){
  537. str = str + n.F_OptContent+"<br>";
  538. // alert(str)
  539. }
  540. var spandeta="";
  541. // if (n.Detail==null) {
  542. // spandeta=""
  543. // } else if (n.Detail==""){
  544. // spandeta=""
  545. // }else if(n.IsLast == 1){
  546. // spandeta="完结内容:"+n.F_OptContent
  547. // }else if(n.SureUserName) {
  548. // spandeta="接单内容:"+n.F_OptContent
  549. // } else if(n.DealTime){
  550. // spandeta="处理内容:"+n.F_OptContent
  551. // }else if(n.ToDeptName){
  552. // spandeta="转派内容:"+n.F_OptContent
  553. // }
  554. if ($(".spandeta").text()=="") {
  555. $(this).hide();
  556. }
  557. //else if(row.IsStart) {str = str + row.CreateUserName + " 重新开启工单";}
  558. $('<li class="mui-table-view-cell mui-table-view-cell-line mui-tail-contail mui-table-view-li"><div class="mui-input-row mui-tail font-color4"><span>' + n.F_CreateTime +
  559. '</span></br><span style="font-size:12px;">' + str +
  560. '</span><span class="spandeta">'+spandeta+
  561. '</span></div><div class="string"></div><div class="circular_h"></div></li>').appendTo('#folow');
  562. });
  563. var num = data.rows.length - 1;
  564. $("#folow li:eq(0)").children(".string").css("top", "20px");
  565. $("#folow li:eq(" + num + ")").children(".string").css("height", "5px");
  566. $("#folow li:eq(0)").children(".string").css("top", "20px");
  567. $("#folow li:eq(0)").children(".circular_h").css({
  568. "background": "#2cc6a7",
  569. "left": "15px",
  570. "top": "20px",
  571. "width": "12px",
  572. "height": "12px",
  573. "border-radius": "6px"
  574. });
  575. $("#folow li:eq(" + num + ")").children(".circular_h").css({
  576. "left": "15px",
  577. "width": "12px",
  578. "height": "12px",
  579. "border-radius": "6px"
  580. });
  581. }
  582. }
  583. },
  584. error: function(xhr, type, errorThrown) {
  585. //异常处理;
  586. }
  587. })
  588. }
  589. //催单记录
  590. // function Remind() {
  591. // $.ajax({
  592. // url: huayi.config.callcenter_url + 'WxLogin/GetDetails',
  593. // data: {
  594. // id: id, //工单编号
  595. // type: 2,
  596. // OpenId: openid, //微信openid,
  597. // },
  598. // async: true,
  599. // dataType: 'json',
  600. // type: 'get', //HTTP请求类型
  601. // success: function(data) {
  602. // if(data.state.toLowerCase() == "success") {
  603. // if(data.rows && data.rows.length > 0) {
  604. // $(data.rows).each(function(i, n) {
  605. // var spandeta;
  606. // if (n.Detail==null) {
  607. // spandeta=""
  608. // } else if (n.Detail==""){
  609. // spandeta=""
  610. // }else{
  611. // spandeta="催办内容:"+n.Detail
  612. // }
  613. // var depart;
  614. // if(n.ToDeptName==null){
  615. // depart=""
  616. // }else{
  617. // depart=n.ToDeptName
  618. // }
  619. // var deperson;
  620. // if(n.ToUserName==null){
  621. // deperson=""
  622. // }else{
  623. // deperson=n.ToUserName
  624. // }
  625. // $('<li class="mui-table-view-cell mui-table-view-cell-line mui-tail-contail mui-table-view-li"><div class="mui-input-row mui-tail font-color4"><span>' + n.CreateTime +
  626. //// '</span></br><span>被催办部门:'+depart+
  627. //// '</span></br><span>被催办人:'+deperson+
  628. // '</span></br><span>催办人:' + n.CreateUserName +
  629. // '</span></br><span>'+spandeta+
  630. // '</span></div><div class="string"></div><div class="circular_h"></div></li>').appendTo('#remind');
  631. // });
  632. // var num = data.rows.length - 1;
  633. // $("#remind li:eq(0)").children(".string").css("top", "20px");
  634. // $("#remind li:eq(" + num + ")").children(".string").css("height", "5px");
  635. // $("#remind li:eq(0)").children(".string").css("top", "20px");
  636. // $("#remind li:eq(0)").children(".circular_h").css({
  637. // "background": "#2cc6a7",
  638. // "left": "15px",
  639. // "top": "20px",
  640. // "width": "12px",
  641. // "height": "12px",
  642. // "border-radius": "6px"
  643. // });
  644. // $("#remind li:eq(" + num + ")").children(".circular_h").css({
  645. // "left": "15px",
  646. // "width": "12px",
  647. // "height": "12px",
  648. // "border-radius": "6px"
  649. // });
  650. // }
  651. // }
  652. // },
  653. // error: function(xhr, type, errorThrown) {
  654. // //异常处理;
  655. // }
  656. // })
  657. // }
  658. //评论记录
  659. // function Comment() {
  660. // $.ajax({
  661. // url: huayi.config.callcenter_url + 'WxLogin/GetDetails',
  662. // data: {
  663. // id: id, //工单编号
  664. // type: 3,
  665. // OpenId: openid, //微信openid,
  666. // },
  667. // async: true,
  668. // dataType: 'json',
  669. // type: 'get', //HTTP请求类型
  670. // success: function(data) {
  671. // if(data.state.toLowerCase() == "success") {
  672. // if(data.rows && data.rows.length > 0) {
  673. //
  674. // $(data.rows).each(function(i, n) {
  675. // var spandeta;
  676. // if (n.Detail==null) {
  677. // spandeta=""
  678. // } else if (n.Detail==""){
  679. // spandeta=""
  680. // }else{
  681. // spandeta="评论内容:"+n.Detail
  682. // }
  683. // $('<li class="mui-table-view-cell mui-table-view-cell-line mui-tail-contail mui-table-view-li"><div class="mui-input-row mui-tail font-color4"><span>' + n.CreateTime +
  684. // '</span></br><span >'+spandeta+
  685. // '</span><span class="span3">' + n.CreateUserName +
  686. // '</span></div><div class="string"></div><div class="circular_h"></div></li>').appendTo('#commentlist');
  687. // if (n.Detail==null||n.Detail=="") {
  688. // $(".spandeta").hide();
  689. // } else{
  690. // $(".spandeta").show();
  691. // }
  692. // });
  693. // var num = data.rows.length - 1;
  694. // $("#commentlist li:eq(0)").children(".string").css("top", "20px");
  695. // $("#commentlist li:eq(" + num + ")").children(".string").css("height", "5px");
  696. // $("#commentlist li:eq(0)").children(".string").css("top", "20px");
  697. // $("#commentlist li:eq(0)").children(".circular_h").css({
  698. // "background": "#2cc6a7",
  699. // "left": "15px",
  700. // "top": "20px",
  701. // "width": "12px",
  702. // "height": "12px",
  703. // "border-radius": "6px"
  704. // });
  705. // $("#commentlist li:eq(" + num + ")").children(".circular_h").css({
  706. // "left": "15px",
  707. // "width": "12px",
  708. // "height": "12px",
  709. // "border-radius": "6px"
  710. // });
  711. // }
  712. // }
  713. // },
  714. // error: function(xhr, type, errorThrown) {
  715. // //异常处理;
  716. // }
  717. // })
  718. // }
  719. //转派
  720. //转派弹框
  721. $(".allot").click(function() {
  722. var areaID = $("#Work_areaname").attr('data-index')
  723. window.location.href = "redeploy.html?id=" + id+'&itype='+itype+'&areaID='+areaID;
  724. })
  725. // 处理提单框
  726. $(".disp").click(function() {
  727. var areaID = $("#Work_areaname").attr('data-index')
  728. window.location.href = "dispose.html?id=" + id+'&itype='+itype+'&areaID='+areaID;
  729. })
  730. //评论工单
  731. $(".comment").click(function(){
  732. $(".pop_up_bj").fadeIn();
  733. $(".pop_up_div1").fadeIn();
  734. })
  735. $(".pop_up_bj" ).click(function(){
  736. $(".pop_up_bj").hide();
  737. $(".pop_up_div1").hide();
  738. })
  739. $(".pop_up_div1 .btn .fl" ).click(function(){
  740. $(".pop_up_bj").hide();
  741. $(".pop_up_div1").hide();
  742. })
  743. $(".pop_up_div1 .btn .fr" ).click(function(){
  744. $(".pop_up_bj").hide();
  745. $(".pop_up_div1").hide();
  746. })
  747. $(".evaluate").click(function(){
  748. if(!$(".evaluate_con").val()) {
  749. mui.alert("请输入评论内容");
  750. }else{
  751. $(".pop_up_bj").hide();
  752. $(".pop_up_div3").hide();
  753. $.ajax({
  754. type: "post",
  755. dataType: 'json',
  756. url: huayi.config.callcenter_url + '/WxLogin/CommentWorkOrder',
  757. async: true,
  758. data: {
  759. orderid: id, //否 strubg 工单编号
  760. cont: $(".evaluate_con").val(), //否 int 处理内容
  761. openid: openid, //微信openid,
  762. },
  763. success: function(data) {
  764. if(data.state == "success") {
  765. debugger
  766. mui.toast('评论成功');
  767. window.location.href = "details.html?id=" + id+'&itype='+itype;
  768. } else {
  769. mui.toast(data.message);
  770. }
  771. }
  772. });
  773. }
  774. })
  775. //处理完结
  776. $(".daal").click(function(){
  777. $(".pop_up_bj").fadeIn();
  778. $(".pop_up_div6").fadeIn();
  779. })
  780. $(".pop_up_bj" ).click(function(){
  781. $(".pop_up_bj").hide();
  782. $(".pop_up_div6").hide();
  783. })
  784. $(".pop_up_div6 .btn .fl" ).click(function(){
  785. $(".pop_up_bj").hide();
  786. $(".pop_up_div6").hide();
  787. })
  788. $(".pop_up_div6 .btn .fr" ).click(function(){
  789. // $("#cont").text("");
  790. $(".pop_up_bj").hide();
  791. $(".pop_up_div6").hide();
  792. if($("#deal_cont").val()=="") {
  793. mui.alert("请输入处理内容");
  794. }else{
  795. $(".pop_up_bj").hide();
  796. $(".pop_up_div6").hide();
  797. $.ajax({
  798. type: "post",
  799. dataType: 'json',
  800. url: huayi.config.callcenter_url + '/WxLogin/DealWorkOrder',
  801. async: true,
  802. data: {
  803. orderid: id, //否 strubg 工单编号
  804. isend: 1, //否 int 你看一下前端是什么参数
  805. cont: $("#deal_cont").val(), //否 int 处理内容
  806. openid: openid, //微信openid 测试用
  807. },
  808. success: function(data) {
  809. if(data.state == "success") {
  810. debugger
  811. mui.toast('处理成功');
  812. window.location.href = "pend_index.html";
  813. } else {
  814. mui.toast(data.message);
  815. }
  816. }
  817. });
  818. }
  819. })
  820. //完结
  821. $(".finsh").click(function(){
  822. $(".pop_up_bj").fadeIn();
  823. $(".pop_up_div2").fadeIn();
  824. })
  825. $(".pop_up_bj" ).click(function(){
  826. $(".pop_up_bj").hide();
  827. $(".pop_up_div2").hide();
  828. })
  829. $(".pop_up_div2 .btn .fl" ).click(function(){
  830. $(".pop_up_bj").hide();
  831. $(".pop_up_div2").hide();
  832. mui.alert("取消");
  833. })
  834. $(".pop_up_div2 .btn .fr" ).click(function(){
  835. $("#finsh_cont").text("");
  836. $(".pop_up_bj").hide();
  837. $(".pop_up_div2").hide();
  838. if($(".textcont").val()=="") {
  839. mui.alert("请输入完结内容");
  840. }else{
  841. $(".pop_up_bj").hide();
  842. $(".pop_up_div2").hide();
  843. $.ajax({
  844. type: "post",
  845. dataType: 'json',
  846. url: huayi.config.callcenter_url + '/WxLogin/DealWorkOrder',
  847. async: true,
  848. data: {
  849. orderid: id, //否 strubg 工单编号
  850. isend: 1, //否 int 你看一下前端是什么参数
  851. cont: $("#finsh_cont").val(), //否 int 处理内容
  852. openid: openid, //微信openid,
  853. },
  854. success: function(data) {
  855. if(data.state == "success") {
  856. debugger
  857. mui.toast('处理成功');
  858. window.location.href = "client_index.html?id=" + id+'&itype='+itype;
  859. } else {
  860. mui.toast(data.message);
  861. }
  862. }
  863. });
  864. }
  865. })
  866. //处理
  867. $(".deal").click(function(){
  868. $(".pop_up_bj").fadeIn();
  869. $(".pop_up_div4").fadeIn();
  870. })
  871. $(".pop_up_bj" ).click(function(){
  872. $(".pop_up_bj").hide();
  873. $(".pop_up_div4").hide();
  874. })
  875. $(".pop_up_div4 .btn .fl" ).click(function(){
  876. $(".pop_up_bj").hide();
  877. $(".pop_up_div4").hide();
  878. mui.alert("取消");
  879. })
  880. $(".pop_up_div4 .btn .fr" ).click(function(){
  881. // $("#cont").text("");
  882. $(".pop_up_bj").hide();
  883. $(".pop_up_div4").hide();
  884. if($(".textcont_deal").val()=="") {
  885. mui.alert("请输入处理内容");
  886. }else{
  887. $(".pop_up_bj").hide();
  888. $(".pop_up_div4").hide();
  889. $.ajax({
  890. type: "post",
  891. dataType: 'json',
  892. url: huayi.config.callcenter_url + '/WxLogin/DealWorkOrder',
  893. async: true,
  894. data: {
  895. orderid: id, //否 strubg 工单编号
  896. isend: itype, //否 int 你看一下前端是什么参数
  897. cont: $("#textcont_deal").val(), //否 int 处理内容
  898. Openid: openid, //微信openid,
  899. },
  900. success: function(data) {
  901. if(data.state == "success") {
  902. debugger
  903. mui.toast('处理成功');
  904. window.location.href = "pend_index.html?id=" + id+'&itype='+itype;
  905. } else {
  906. mui.toast(data.message);
  907. }
  908. }
  909. });
  910. }
  911. })
  912. //回复
  913. $(".btn_reply").click(function(){
  914. var btnArray = ['取消', '确定'];
  915. mui.confirm('确定回复?', '提示', btnArray, function(f) {
  916. if(f.index == 1) {
  917. $.ajax({
  918. type: "post",
  919. dataType: 'json',
  920. url: huayi.config.callcenter_url + 'WxLogin/ReplyWorkOrder',
  921. async: true,
  922. data: {
  923. openid: openid,// 是 strubg openid
  924. orderid: id// 是 string 工单号码
  925. },
  926. success: function(data) {
  927. if(data.state == "success") {
  928. mui.toast('操作成功');
  929. window.location.href = "client_index.html?id=" + id+'&itype='+itype;
  930. } else {
  931. mui.toast(data.message);
  932. }
  933. }
  934. });
  935. } else {
  936. mui.toast("取消操作");
  937. }
  938. })
  939. });
  940. //接单
  941. $(".rece").click(function(){
  942. var btnArray = ['否', '是'];
  943. mui.confirm('确定接单?', '提示', btnArray, function(f) {
  944. if(f.index == 1) {
  945. $.ajax({
  946. type: "get",
  947. dataType: 'json',
  948. url: huayi.config.callcenter_url + 'WxLogin/SureWorkOrder',
  949. async: true,
  950. data: {
  951. orderid: id, //否 strubg 工单编号
  952. OpenId: openid, //微信openid 测试用
  953. },
  954. success: function(data) {
  955. debugger
  956. // alert(data.state)
  957. if(data.state == "success") {
  958. mui.toast('接单成功');
  959. window.location.href = "Waiting_list.html";
  960. } else {
  961. mui.toast(data.message);
  962. }
  963. }
  964. });
  965. } else {
  966. mui.toast("取消");
  967. }
  968. })
  969. })
  970. //审批
  971. $(".receiving").click(function(){
  972. $(".pop_up_bj").fadeIn();
  973. $(".pop_up_div9").fadeIn();
  974. })
  975. $(".pop_up_bj" ).click(function(){
  976. $(".pop_up_bj").hide();
  977. $(".pop_up_div9").hide();
  978. })
  979. $(".pop_up_div9 .btn .fl" ).click(function(){
  980. $(".pop_up_bj").hide();
  981. $(".pop_up_div9").hide();
  982. })
  983. $(".pop_up_div9 .btn .fr" ).click(function(){
  984. // $("#cont").text("");
  985. $(".pop_up_bj").hide();
  986. $(".pop_up_div9").hide();
  987. if($(".reasaa").val()=="") {
  988. mui.alert("请输入审批意见.");
  989. }else{
  990. $(".pop_up_bj").hide();
  991. $(".pop_up_div9").hide();
  992. $.ajax({
  993. type: "get",
  994. dataType: 'json',
  995. url: huayi.config.callcenter_url + 'WxLogin/GetApproval',
  996. async: true,
  997. data: {
  998. orderid: id, //否 strubg 工单编号
  999. OpenId: openid,
  1000. AuditCont: $(".reasaa").val(),
  1001. IsAudit:1,
  1002. AuditState:$('.order_ty').find('input[type="radio"]:checked').val(), //工单类型
  1003. },
  1004. success: function(data) {
  1005. debugger
  1006. if(data.state == "success") {
  1007. debugger
  1008. mui.toast('申请成功');
  1009. window.location.href = "client_index.html?id=" + id+'&itype='+itype;
  1010. } else {
  1011. mui.toast(data.message);
  1012. }
  1013. }
  1014. });
  1015. }
  1016. })
  1017. //高层审批
  1018. $(".approva").click(function(){
  1019. $(".pop_up_bj").fadeIn();
  1020. $(".pop_up_div10").fadeIn();
  1021. })
  1022. $(".pop_up_bj" ).click(function(){
  1023. $(".pop_up_bj").hide();
  1024. $(".pop_up_div10").hide();
  1025. })
  1026. $(".pop_up_div10 .btn .fl" ).click(function(){
  1027. $(".pop_up_bj").hide();
  1028. $(".pop_up_div10").hide();
  1029. })
  1030. $(".pop_up_div10 .btn .fr" ).click(function(){
  1031. // $("#cont").text("");
  1032. $(".pop_up_bj").hide();
  1033. $(".pop_up_div10").hide();
  1034. if($(".reaa").val()=="") {
  1035. mui.alert("请输入审批意见.11");
  1036. }else{
  1037. $(".pop_up_bj").hide();
  1038. $(".pop_up_div10").hide();
  1039. $.ajax({
  1040. type: "get",
  1041. dataType: 'json',
  1042. url: huayi.config.callcenter_url + 'WxLogin/HigApprovalOrder',
  1043. async: true,
  1044. data: {
  1045. orderid: id, //否 strubg 工单编号
  1046. OpenId: openid,
  1047. cont: $(".reaa").val(),
  1048. },
  1049. success: function(data) {
  1050. debugger
  1051. if(data.state == "success") {
  1052. debugger
  1053. mui.toast('申请成功');
  1054. window.location.href = "high_list.html?id=" + id+'&itype='+itype;
  1055. } else {
  1056. mui.toast(data.message);
  1057. }
  1058. }
  1059. });
  1060. }
  1061. })
  1062. //退回
  1063. $(".sendback").click(function(){
  1064. $(".pop_up_bj").fadeIn();
  1065. $(".pop_up_div6").fadeIn();
  1066. })
  1067. $(".pop_up_bj" ).click(function(){
  1068. $(".pop_up_bj").hide();
  1069. $(".pop_up_div6").hide();
  1070. })
  1071. $(".pop_up_div6 .btn .fl" ).click(function(){
  1072. $(".pop_up_bj").hide();
  1073. $(".pop_up_div6").hide();
  1074. })
  1075. $(".pop_up_div6 .btn .fr" ).click(function(){
  1076. // $("#cont").text("");
  1077. $(".pop_up_bj").hide();
  1078. $(".pop_up_div6").hide();
  1079. if($("#deal_cont").val()=="") {
  1080. mui.alert("请输入处理内容");
  1081. }else{
  1082. $(".pop_up_bj").hide();
  1083. $(".pop_up_div6").hide();
  1084. $.ajax({
  1085. type: "get",
  1086. dataType: 'json',
  1087. url: huayi.config.callcenter_url + 'WxLogin/BackWorkOrder',
  1088. async: true,
  1089. data: {
  1090. orderid: id, //否 strubg 工单编号
  1091. type: 0, //否 int 你看一下前端是什么参数
  1092. cont: $("#deal_cont").val(), //否 int 处理内容
  1093. openid: openid, //微信openid 测试用
  1094. },
  1095. success: function(data) {
  1096. if(data.state == "success") {
  1097. debugger
  1098. mui.toast('退回成功');
  1099. window.location.href = "Waiting_list.html?id=" + id+'&itype='+itype;
  1100. } else {
  1101. mui.toast(data.message);
  1102. }
  1103. }
  1104. });
  1105. }
  1106. })
  1107. //申请延期实现
  1108. $(".postpone").click(function(){
  1109. $(".pop_up_bj").fadeIn();
  1110. $(".pop_up_div8").fadeIn();
  1111. })
  1112. $(".pop_up_bj" ).click(function(){
  1113. $(".pop_up_bj").hide();
  1114. $(".pop_up_div8").hide();
  1115. })
  1116. $(".pop_up_div8 .btn .fl" ).click(function(){
  1117. $(".pop_up_bj").hide();
  1118. $(".pop_up_div8").hide();
  1119. })
  1120. $(".pop_up_div8 .btn .fr" ).click(function(){
  1121. // $("#cont").text("");
  1122. $(".pop_up_bj").hide();
  1123. $(".pop_up_div8").hide();
  1124. if($(".reas").val()=="") {
  1125. mui.alert("请输入延期说明.");
  1126. }else{
  1127. $(".pop_up_bj").hide();
  1128. $(".pop_up_div8").hide();
  1129. $.ajax({
  1130. type: "get",
  1131. dataType: 'json',
  1132. url: huayi.config.callcenter_url + 'WxLogin/DelayWorkOrder',
  1133. async: true,
  1134. data: {
  1135. orderid: id, //否 strubg 工单编号
  1136. // type: 0, //否 int 你看一下前端是什么参数 reas
  1137. cont: $(".reas").val(),
  1138. // limit:$("#order_source").val(), //否 int 处理内容
  1139. limit:$('.order_type').find('input[type="radio"]:checked').val(), //工单类型
  1140. openid: openid, //微信openid 测试用
  1141. },
  1142. success: function(data) {
  1143. debugger
  1144. if(data.state == "success") {
  1145. debugger
  1146. mui.toast('申请成功');
  1147. window.location.href = "haveorder_list.html?id=" + id+'&itype='+itype;
  1148. } else {
  1149. mui.toast(data.message);
  1150. }
  1151. }
  1152. });
  1153. }
  1154. })
  1155. //异常退回
  1156. $(".abnormal").click(function(){
  1157. $(".pop_up_bj").fadeIn();
  1158. $(".pop_up_div6").fadeIn();
  1159. })
  1160. $(".pop_up_bj" ).click(function(){
  1161. $(".pop_up_bj").hide();
  1162. $(".pop_up_div6").hide();
  1163. })
  1164. $(".pop_up_div6 .btn .fl" ).click(function(){
  1165. $(".pop_up_bj").hide();
  1166. $(".pop_up_div6").hide();
  1167. })
  1168. $(".pop_up_div6 .btn .fr" ).click(function(){
  1169. // $("#cont").text("");
  1170. $(".pop_up_bj").hide();
  1171. $(".pop_up_div6").hide();
  1172. if($("#deal_cont").val()=="") {
  1173. mui.alert("请输入处理内容");
  1174. }else{
  1175. $(".pop_up_bj").hide();
  1176. $(".pop_up_div6").hide();
  1177. $.ajax({
  1178. type: "post",
  1179. dataType: 'json',
  1180. url: huayi.config.callcenter_url + 'WxLogin/BackWorkOrder',
  1181. async: true,
  1182. data: {
  1183. orderid: id, //否 strubg 工单编号
  1184. type: 1, //否 int 你看一下前端是什么参数
  1185. cont: $("#deal_cont").val(), //否 int 处理内容
  1186. openid: openid, //微信openid 测试用
  1187. },
  1188. success: function(data) {
  1189. debugger
  1190. if(data.state == "success") {
  1191. debugger
  1192. mui.toast('退回成功');
  1193. window.location.href = "Waiting_list.html?id=" + id+'&itype='+itype;
  1194. } else {
  1195. mui.toast(data.message);
  1196. }
  1197. }
  1198. });
  1199. }
  1200. })
  1201. //删除工单
  1202. $(".delet").click(function(){
  1203. var btnArray = ['否', '是'];
  1204. mui.confirm('确定删除?', '提示', btnArray, function(f) {
  1205. if(f.index == 1) {
  1206. $.ajax({
  1207. type: "post",
  1208. dataType: 'json',
  1209. url: huayi.config.callcenter_url + '/WxLogin/DelWorkOrder',
  1210. async: true,
  1211. data: {
  1212. ids: $(".WordID").text(), //否 strubg 工单编号
  1213. openid: openid, //微信openid,
  1214. },
  1215. success: function(data) {
  1216. if(data.state == "success") {
  1217. debugger
  1218. mui.toast('删除成功');
  1219. if (itype==2) {
  1220. window.location.href = "pend_index.html";
  1221. } else if(itype==3){
  1222. window.location.href = "finsh_index.html";
  1223. }
  1224. } else {
  1225. mui.toast(data.message);
  1226. }
  1227. }
  1228. });
  1229. } else {
  1230. mui.toast("取消");
  1231. }
  1232. })
  1233. })
  1234. //催单
  1235. $(".reminder").click(function(){
  1236. $(".pop_up_bj").fadeIn();
  1237. $(".pop_up_div5").fadeIn();
  1238. })
  1239. $(".pop_up_bj" ).click(function(){
  1240. $(".pop_up_bj").hide();
  1241. $(".pop_up_div5").hide();
  1242. })
  1243. $(".pop_up_div5 .btn .fl" ).click(function(){
  1244. $(".pop_up_bj").hide();
  1245. $(".pop_up_div5").hide();
  1246. })
  1247. $(".pop_up_div5 .btn .fr" ).click(function(){
  1248. // $("#cont").text("");
  1249. $(".pop_up_bj").hide();
  1250. $(".pop_up_div5").hide();
  1251. if($(".textcont").val()=="") {
  1252. mui.alert("请输入催单内容");
  1253. }else{
  1254. $(".pop_up_bj").hide();
  1255. $(".pop_up_div5").hide();
  1256. $.ajax({
  1257. type: "post",
  1258. dataType: 'json',
  1259. url: huayi.config.callcenter_url + '/WxLogin/RemindWorkOrder',
  1260. async: true,
  1261. data: {
  1262. orderid: id, //否 strubg 工单编号
  1263. cont: $(".reminder_con").val(), //否 int 处理内容
  1264. openid: openid, //微信openid,
  1265. //openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE', //微信openid 测试用
  1266. },
  1267. success: function(data) {
  1268. if(data.state == "success") {
  1269. // debugger
  1270. mui.toast('催单成功');
  1271. window.location.href = "pend_index.html?id=" + id+'&itype='+itype;
  1272. } else {
  1273. mui.toast(data.message);
  1274. }
  1275. }
  1276. });
  1277. }
  1278. })
  1279. $("#qita").click(function(){
  1280. $("#order_source").show();
  1281. })
  1282. </script>
  1283. </body>
  1284. </html>