新野县12345_前端

workDetail.js 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. var wid = helper.request.queryString("wid");
  2. $(document).ready(function () {
  3. if (wid) {
  4. load();
  5. $("#Change").val(wid);
  6. //预览
  7. $(".print").click(function () {
  8. // layer.open({
  9. // type: 2,
  10. // content: "PrintPreview-1.html?wid=" + wid, //iframe的url,no代表不显示滚动条
  11. // title: '打印',
  12. // area: ['80%', '90%'], //宽高
  13. // });
  14. window.location.href = "PrintPreview-1.html?wid=" + wid;
  15. })
  16. //关闭
  17. $(".closexq").click(function () {
  18. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  19. parent.layer.close(index); //再执行关闭
  20. })
  21. }
  22. //弹屏右侧切换效果
  23. $(".ld-service li").click(function () {
  24. $(this).addClass("cr-click").siblings().removeClass("cr-click");
  25. var index = $(this).index();
  26. var ss = $(this).attr("itemtype");
  27. $(".Content_box").find(".complain").eq(index).addClass("Shows").siblings().removeClass("Shows");
  28. });
  29. //转媒体
  30. $('.mediaTransfer').click(function () {
  31. layer.open({
  32. content: '是否要发布到网站?',
  33. btn: ['是', '否'],
  34. yes: function (index, layero) {
  35. $.post(huayi.config.callcenter_url + "WorkOrder/ReleaseWorkOrder", {
  36. workorderid: wid,//工单编号
  37. isrelease: 1,//(0撤回,1转媒体)
  38. token: $.cookie("token")
  39. }, function (result) {
  40. var data = JSON.parse(result);
  41. if (data.state == "success") {
  42. $(".mediaTransfer").hide();
  43. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  44. parent.layer.close(index); //再执行关闭
  45. parent.load();
  46. parent.layer.msg("发布网站成功");
  47. }
  48. })
  49. }
  50. })
  51. });
  52. //修改
  53. $(".change").click(function () {
  54. var str = $("#Change").val();
  55. // window.location.href = "../CommonHtml/XGwordel.html?wid=" + str;
  56. window.location.href = "../CommonHtml/AddAppeal.html?wid=" + str;
  57. })
  58. });
  59. function load() {
  60. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
  61. workorderid: wid,
  62. "token": $.cookie("token")
  63. }, function(result) {
  64. if (result.state.toLowerCase() == "success") {
  65. var Data = result.data.data;
  66. var State = Data[0].F_WorkState;
  67. var CLFS = Data[0].F_IsResult;
  68. var isprotect = Data[0].isprotect;
  69. var level = Data[0].F_Level;
  70. $(".F_CusName").text(Data[0].F_CusName);
  71. $(".F_ConPhone").text(Data[0].F_CusPhone);
  72. $(".F_CusPhone").text(Data[0].F_ConPhone);
  73. $(".F_ComTitle").text(Data[0].F_ComTitle);
  74. $('.F_ComContent').text(Data[0].F_ComContent);
  75. $('.F_SourceAddress').text(Data[0].F_SourceAddress);
  76. $('.F_FinalOpinion').text(Data[0].F_FinalOpinion);
  77. $('.LRSJ').text(Data[0].F_CreateTime);//录入时间
  78. $('.submitTime').text(Data[0].F_SubmitTime);//提交时间
  79. $('.SLHJ').text(Data[0].F_EndTime);//办理时间
  80. $('.lawsuitTime').text(Data[0].F_CloseTime);//结案时间
  81. $('.SL').text(Data[0].UserName);
  82. $(".DH").text(Data[0].F_WorkOrderId);
  83. $(".LY").text(Data[0].SourceName);
  84. $(".LX").text(Data[0].TypeName1);
  85. $(".Result").text(Data[0].F_Result);
  86. $(".sourceName").text(Data[0].AddressName);
  87. $(".ComplainedUnit").text(Data[0].ComplainedUnit);
  88. $(".AreaName").text(Data[0].AreaName);
  89. //附件
  90. var HTML;
  91. $(Data[0].File).each(function(i, n) {
  92. HTML = '<a style="margin-right:5px;" href="' + n.F_FileUrl + '" download="' + n.F_FileName.substring(19) + '">' + n.F_FileName.substring(19) + '</a>'
  93. $(HTML).appendTo($('.FJ'));
  94. })
  95. if (State == 0) {
  96. $('.ZT').text("新工单");
  97. } else if (State == 1) {
  98. $('.ZT').text("待交办");
  99. } else if (State == 2) {
  100. $('.ZT').text("待查收");
  101. } else if (State == 3) {
  102. $('.ZT').text("退回审核中");
  103. } else if (State == 4) {
  104. $('.ZT').text("办理中");
  105. } else if (State == 5) {
  106. $('.ZT').text("延时审核中");
  107. } else if (State == 6) {
  108. $('.ZT').text("已办理");
  109. } else if (State == 7) {
  110. $('.ZT').text("已回访");
  111. } else if (State == 8) {
  112. $('.ZT').text("重办中");
  113. } else if (State == 9) {
  114. $('.ZT').text("已结案");
  115. }
  116. //办理方式
  117. if (CLFS == 0) {
  118. $('.CLFS').text("网络转办");
  119. $(result.data.lcdata).each(function(j, m) {
  120. console.log(m)
  121. $('.step' + m.step + '').find("img").attr('src', '../img/step' + m.step + '_1.png');
  122. $('.step' + m.step + '').find(".step_w0").removeClass().addClass("step_w1");
  123. var str = '<div class="step_content">' +
  124. '<p> 姓名:' + m.name + '</p>' +
  125. '<p> 部门:' + m.dept + '</p>' +
  126. '<p> 时间:' + m.time + '</p>' +
  127. '</div>';
  128. $('.step' + m.step + '').append(str)
  129. })
  130. } else {
  131. $('.CLFS').text("当即办理");
  132. $('.stem_other').hide();
  133. $(result.data.lcdata).each(function(j, m) {
  134. // console.log(m)
  135. $('.step' + m.step + '').find("img").attr('src', '../img/step' + m.step + '_1.png');
  136. $('.step' + m.step + '').find(".step_w0").removeClass().addClass("step_w1");
  137. var str = '<div class="step_content">' +
  138. '<p> 姓名:' + m.name + '</p>' +
  139. '<p> 部门:' + m.dept + '</p>' +
  140. '<p> 时间:' + m.time + '</p>' +
  141. '</div>';
  142. $('.step' + m.step + '').append(str)
  143. })
  144. }
  145. //密级程度
  146. if (Data[0].F_IsProtect == 0) {
  147. $('.MJ').text("普通");
  148. } else {
  149. $('.MJ').text("保密");
  150. }
  151. //紧急程度
  152. if (Data[0].F_Level == 1) {
  153. $('.CD').text("普通");
  154. } else if (Data[0].F_Level == 2) {
  155. $('.CD').text("紧急");
  156. }
  157. //办理情况
  158. var htmls = '';
  159. if (result.data.bldata.length < 0) {
  160. alert(45);
  161. htmls = '<tr>' +
  162. '<td class="text-center">' + n.UserName + '</td>' +
  163. '</tr>';
  164. }
  165. $(".BLQK").empty();
  166. //console.log(result.data.bldata);
  167. $(result.data.bldata).each(function(i, n) {
  168. var bval = n.F_Type;
  169. switch (bval + '') {
  170. case '1':
  171. bval = '主办';
  172. break;
  173. case '2':
  174. bval = '协办';
  175. break;
  176. }
  177. htmls += '<tr>' +
  178. '<td class="text-center">' + n.UserName + '</td>' +
  179. '<td class="text-center">' + n.DeptName + '</td>' +
  180. '<td class="text-center" data-formatter="shtype">' + bval + '</td>' +
  181. '<td class="text-center">' + n.F_Result + '</td>' +
  182. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  183. '<td class="text-center">';
  184. //办理情况附件
  185. $(n.File).each(function(j, m) {
  186. htmls += '<a style="margin-right:5px;" href="' + m.F_FileUrl + '" download="' + m.F_FileName.substring(19) + '">' + m.F_FileName.substring(19) + '</a>';
  187. })
  188. htmls += '</td>' +
  189. '<td class="text-center authority"><botton class="btns BLQKS " dealman="' + n.UserName + '" result="' + n.F_Result + '" type="" index="' + n.F_Id + '">修改</botton></td>' +
  190. '</tr>';
  191. })
  192. $(htmls).appendTo($(".BLQK"));
  193. //回访信息
  194. var htmlss = '';
  195. $(".HGXX").empty();
  196. $(result.data.hfdata).each(function(i, n) {
  197. var a;
  198. var b;
  199. if (n.F_IsSatisfie == 0) {
  200. a = "不满意";
  201. } else {
  202. a = "满意";
  203. }
  204. if (n.F_Type == 0) {
  205. b = "电话";
  206. } else {
  207. b = "微信";
  208. }
  209. htmlss += '<tr>' +
  210. '<td class="text-center">' + (i + 1) + '</td>' +
  211. '<td class="text-center">' + n.F_VisitUser + '</td>' +
  212. '<td class="text-center">' + b + '</td>' +
  213. '<td class="text-center">' + n.F_Result + '</td>' +
  214. '<td class="text-center">' + a + '</td>' +
  215. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  216. '<td class="text-center authority">' +
  217. '<botton class="btns HFXG " index="' + n.F_Id + '" visituser="' + n.F_VisitUser + '"' +
  218. 'result="' + n.F_Result + '" callid="" type="' + n.F_Type + '" issatisfie="' + n.F_IsSatisfie + '">修改</botton>' +
  219. '</td>' +
  220. '</tr>';
  221. })
  222. $(htmlss).appendTo($(".HGXX"));
  223. //交办信息
  224. var jbxx = '';
  225. $(".JBXX").empty();
  226. $(result.data.jbdata).each(function(i, n) {
  227. //debugger;
  228. var OtherDeptName = n.OtherDeptName == null ? '-' : n.OtherDeptName;
  229. jbxx += '<tr>' +
  230. '<td class="text-center">' + (i + 1) + '</td>' +
  231. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  232. '<td class="text-center">' + n.F_LimitTime + '</td>' +
  233. '<td class="text-center">' + n.DeptName + '</td>' +
  234. '<td class="text-center">' + OtherDeptName + '</td>' +
  235. '<td class="text-center">' + n.F_AssignedOpinion + '</td>' +
  236. '<td class="text-center authority"><botton class="btns XGXX " data_time="' + n.F_LimitTime + '" data_Opinio="' + n.F_AssignedOpinion + '" index="' + n.F_Id + '">修改</botton></td>' +
  237. '</tr>';
  238. })
  239. $(jbxx).appendTo($(".JBXX"));
  240. //督办信息
  241. var htmlsss = '';
  242. $(".DBXX").empty();
  243. $(result.data.dbdata).each(function(i, n) {
  244. htmlsss = htmlsss + '<tr>' +
  245. '<td class="text-center">' + (i + 1) + '</td>' +
  246. '<td class="text-center">' + n.UserName + '</td>' +
  247. '<td class="text-center">' + n.F_Content + '</td>' +
  248. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  249. '<td class="text-center">';
  250. //办理情况附件
  251. $(n.File).each(function(j, m) {
  252. htmlsss += '<a style="margin-right:5px;" href="' + m.F_FileUrl + '" download="' + m.F_FileName.substring(19) + '">' + m.F_FileName.substring(19) + '</a>';
  253. })
  254. htmlsss += '</td></tr>';
  255. })
  256. $(htmlsss).appendTo($(".DBXX"));
  257. //监察
  258. var html_ = '';
  259. $(".JC").empty();
  260. $(result.data.jcdata).each(function(i, n) {
  261. html_ += '<tr>' +
  262. '<td class="text-center">' + (i + 1) + '</td>' +
  263. '<td class="text-center">' + n.UserName + '</td>' +
  264. '<td class="text-center">' + n.F_Content + '</td>' +
  265. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  266. '<td class="text-center">';
  267. //办理情况附件
  268. $(n.File).each(function(j, m) {
  269. html_ += '<a style="margin-right:5px;" href="' + m.F_FileUrl + '" download="' + m.F_FileName.substring(19) + '">' + m.F_FileName.substring(19) + '</a>';
  270. })
  271. html_ += '</td></tr>';
  272. })
  273. $(html_).appendTo($(".JC"));
  274. //延时审核
  275. var Ysh = '';
  276. $(".YSSHS").empty();
  277. $(result.data.ysdata).each(function(i, n) {
  278. var a = '未审核';
  279. var b = n.F_AgreeTime;
  280. var c = n.F_RefuseReason;
  281. if (n.F_IsAudit == '1') {
  282. a = '同意';
  283. }
  284. if (n.F_IsAudit == '2') {
  285. a = '拒绝';
  286. }
  287. if (n.F_AgreeTime == null) {
  288. b = '';
  289. }
  290. if (n.F_RefuseReason == null) {
  291. c = '';
  292. }
  293. Ysh += '<tr>' +
  294. '<td class="text-center">' + (i + 1) + '</td>' +
  295. '<td class="text-center">' + a + '</td>' +
  296. '<td class="text-center">' + n.F_NewTime + '</td>' +
  297. '<td class="text-center">' + n.F_Reason + '</td>' +
  298. '<td class="text-center">' + b + '</td>' +
  299. '<td class="text-center">' + c + '</td>' +
  300. '<td class="text-center authority"><botton class="btns LYSSH " index="' + n.F_Id + '" reason="' + n.F_RefuseReason + '" >修改</botton></td>' +
  301. '</tr>';
  302. })
  303. $(Ysh).appendTo($(".YSSHS"));
  304. //退回审核
  305. var Ths = '';
  306. $(".YTHHS").empty();
  307. $(result.data.thdata).each(function(i, n) {
  308. var b = n.F_AuditTime;
  309. var c = n.F_AuditReason;
  310. var a = '未审核';
  311. if (n.F_IsAudit == '1') {
  312. a = '同意';
  313. }
  314. if (n.F_IsAudit == '2') {
  315. a = '拒绝';
  316. }
  317. if (n.F_AuditTime == null) {
  318. b = '';
  319. }
  320. if (n.F_AuditReason == null) {
  321. c = '';
  322. }
  323. Ths += '<tr>' +
  324. '<td class="text-center">' + (i + 1) + '</td>' +
  325. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  326. '<td class="text-center">' + n.F_Result + '</td>' +
  327. '<td class="text-center">' + a + '</td>' +
  328. '<td class="text-center">' + b + '</td>' +
  329. '<td class="text-center">' + c + '</td>' +
  330. '<td class="text-center authority"><botton class="btns LTHSH " index="' + n.F_Id + '" reason="' + n.F_AuditReason + '" >修改</botton></td>' +
  331. '</tr>';
  332. })
  333. $(Ths).appendTo($(".YTHHS"));
  334. //市民催办
  335. $("#citizenReminder").empty();
  336. $(result.data.cbdata).each(function(i, n) {
  337. var html = '<tr>' +
  338. '<td class="text-center">' + (i + 1) + '</td>' +
  339. '<td class="text-center">' + n.F_Content + '</td>' +
  340. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  341. '</tr>';
  342. $(html).appendTo($("#citizenReminder"));
  343. });
  344. //办理过程
  345. $("#BLGC_").empty();
  346. $(result.data.gcdata).each(function(i, n) {
  347. var html = '<tr>' +
  348. '<td class="text-center">' + (i + 1) + '</td>' +
  349. '<td class="text-center">' + n.F_Message + '</td>' +
  350. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  351. '</tr>';
  352. $(html).appendTo($("#BLGC_"));
  353. });
  354. //领导批示
  355. $(".LDPS").empty();
  356. $(result.data.psdata).each(function(i, n) {
  357. var val = n.F_Type;
  358. switch (val + '') {
  359. case '1':
  360. val = '领导批示';
  361. break;
  362. case '2':
  363. val = '市长指示';
  364. break;
  365. case '3':
  366. val = '回退';
  367. break;
  368. }
  369. var str = '<tr>' +
  370. '<td class="text-center">' + val + '</td>' +
  371. '<td class="text-center">' + n.F_BatchReason + '</td>' +
  372. '<td class="text-center">' + n.F_SuperOpinion + '</td>' +
  373. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  374. '<td class="text-center">';
  375. //办理情况附件
  376. $(n.File).each(function(j, m) {
  377. str += '<a style="margin-right:5px;" href="' + m.F_FileUrl + '" download="' + m.F_FileName.substring(19) + '">' + m.F_FileName.substring(19) + '</a>';
  378. })
  379. str += '</td>' +
  380. '<td class="text-center authority"><botton class="btns LDPSS " superuser="' + n.F_BatchReason + '" superopinion="' + n.F_SuperOpinion + '" type="' + n.F_Type + '" index="' + n.F_Id + '">修改</botton></td>' +
  381. '</tr>';
  382. $(str).appendTo($(".LDPS"));
  383. })
  384. //修改监察意见
  385. //转媒体按钮显示或隐藏
  386. if (result.data.issend == '1' && State == '9') {
  387. $(".mediaTransfer").show();
  388. } else {
  389. $(".mediaTransfer").hide();
  390. }
  391. //修改按钮显示或隐藏
  392. if (result.data.isedit == '1') {
  393. $(".authority").show();
  394. } else {
  395. $(".authority").hide();
  396. }
  397. //修改交办意见
  398. $('.XGXX').click(function() {
  399. var index = $(this).attr('index');
  400. // layer.open({
  401. // type: 2,
  402. // content: "../CommonHtml/XGjiaoban.html?wid=" + index + "&time=" + Times + "&Opinio=" + Opinio, //iframe的url,no代表不显示滚动条
  403. // title: '修改交办信息',
  404. // area: ['48%', '40%'], //宽高
  405. // });
  406. window.location.href = "../CommonHtml/XGjiaoban1.html?id=" + index + "&wid=" + wid; //iframe的url,no代表不显示滚动条
  407. })
  408. //修改回访意见
  409. $(".HFXG").click(function() {
  410. var index = $(this).attr('index');
  411. // layer.open({
  412. // type: 2,
  413. // content: "../CommonHtml/XGHF.html?wid=" + index + "&visituser=" + visituser + "&result=" + result + "&type=" + type + "&issatisfie=" + issatisfie, //iframe的url,no代表不显示滚动条
  414. // title: '修改交办信息',
  415. // area: ['58%', '60%'], //宽高
  416. // });
  417. window.location.href = "../CommonHtml/XGHF.html?wid=" + index; //iframe的url,no代表不显示滚动条
  418. });
  419. //领导批示
  420. $(".LDPSS").click(function() {
  421. var index = $(this).attr('index'); //批示ID
  422. var superuser = $(this).attr('superuser'); //批示人
  423. var superopinion = $(this).attr("superopinion"); //批示内容
  424. var type = $(this).attr("type"); //批示类型
  425. // layer.open({
  426. // type: 2,
  427. // content: "../CommonHtml/LDPS.html?wid=" + index + "&superuser=" + superuser + "&superopinion=" + superopinion + "&type=" + type, //iframe的url,no代表不显示滚动条
  428. // title: '修改交办信息',
  429. // area: ['58%', '60%'], //宽高
  430. // })
  431. window.location.href = "../CommonHtml/LDPS.html?wid=" + index; //iframe的url,no代表不显示滚动条
  432. });
  433. //办理情况
  434. $(".BLQKS").click(function() {
  435. var index = $(this).attr('index');
  436. // layer.open({
  437. // type: 2,
  438. // content: "../CommonHtml/XGBLS.html?wid=" + index + "&UserName=" + UserName + "&result=" + result, //iframe的url,no代表不显示滚动条
  439. // title: '修改办理信息',
  440. // area: ['58%', '60%'], //宽高
  441. // })
  442. window.location.href = "../CommonHtml/XGBLS.html?wid=" + index;
  443. })
  444. //修改审核延时
  445. $(".LYSSH").click(function() {
  446. var index = $(this).attr('index');
  447. // layer.open({
  448. // type: 2,
  449. // content: "../CommonHtml/YSSH.html?wid=" + index + "&reason=" + result , //iframe的url,no代表不显示滚动条
  450. // title: '修改延时审核信息',
  451. // area: ['58%', '60%'], //宽高
  452. // })
  453. window.location.href = "../CommonHtml/YSSH.html?wid=" + index;
  454. })
  455. //修改退回审核
  456. $(".LTHSH").click(function() {
  457. var index = $(this).attr('index');
  458. // layer.open({
  459. // type: 2,
  460. // content: "../CommonHtml/lSHTH.html?wid=" + index + "&reason=" + result , //iframe的url,no代表不显示滚动条
  461. // title: '修改延时审核信息',
  462. // area: ['58%', '60%'], //宽高
  463. // })
  464. window.location.href = "../CommonHtml/lSHTH.html?wid=" + index;
  465. })
  466. }
  467. })
  468. }