Geen omschrijving

Supervision_.html 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <link rel="stylesheet" href="../css/bootstrap-select.css" />
  8. <link rel="stylesheet" href="../css/addappeal.css" />
  9. <link rel="stylesheet" href="../css/layer/need/layer.css" />
  10. <link rel="stylesheet" href="../css/init.css" />
  11. <title>监察</title>
  12. <style>
  13. .input {
  14. background-color: #FFF;
  15. background-image: none;
  16. border: 1px solid #ccc;
  17. border-radius: 1px;
  18. color: inherit;
  19. padding: 6px 12px
  20. }
  21. .fjnr {
  22. padding: 0 !important;
  23. border: none !important;
  24. }
  25. .Common {
  26. height: 90%;
  27. }
  28. .whetherSupervise {
  29. display: none;
  30. }
  31. </style>
  32. </head>
  33. <body>
  34. <div class="Common">
  35. <table>
  36. <tr>
  37. <th class="Importent title">督查意见:</th>
  38. <td><textarea data-adaptheight id='overseeopinion' textarea name="" rows="4" cols=""></textarea></td>
  39. </tr>
  40. <tr>
  41. <th>附件上传:</th>
  42. <td colspan="7">
  43. <!--<span class="fjnr"></span>-->
  44. <div class="fileBox">
  45. <!--<span class="files">文件1<i class="fa fa-remove"></i></span>-->
  46. </div>
  47. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  48. <input class="input" type="button" value="上传" id="scwj" />
  49. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  50. <input type="hidden" id="file" />
  51. <span style="color:#FF0000; border: none;">
  52. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  53. </span>
  54. </td>
  55. </tr>
  56. <tr class="whetherSupervise">
  57. <th>交办单位:</th>
  58. <td colspan="1">
  59. <select id="jbSelect" name="select" class="selectpicker show-tick form-control" multiple data-live-search="true">
  60. </select>
  61. </td>
  62. </tr>
  63. <tr class="whetherSupervise superviseWay">
  64. <th>督办方式:</th>
  65. <td colspan="">
  66. <input class="radioStyle" type="radio" name="mj" value="0" />
  67. <span>现场</span>
  68. <input class="radioStyle" type="radio" name="mj" value="1" checked="checked" />
  69. <span>电话</span>
  70. </td>
  71. </tr>
  72. <tr class="whetherSupervise limittimeWrapper">
  73. <th>办理时限:</th>
  74. <td colspan="">
  75. <select class="startTime" id="startTime" style="width: 200px; height: 30px; line-height: 30px;">
  76. <!--<option value="0">选择</option>-->
  77. <option value="1">一天</option>
  78. <option value="3">三天</option>
  79. <option value="5">五天</option>
  80. <option value="7">七天</option>
  81. </select>
  82. </td>
  83. </tr>
  84. <tr class="whetherSupervise limittimesWrapper">
  85. <th>紧急时限:</th>
  86. <td colspan="">
  87. <input type="text" id="limittimes">
  88. </td>
  89. </tr>
  90. </table>
  91. <div class="btn_box">
  92. <button class="btns DB">保存</button>
  93. <button class="btns JC">保存</button>
  94. <button class="btns associatWorkOrder">关联工单</button>
  95. </div>
  96. </div>
  97. <script src="../js/adjustHeight.js"></script>
  98. <script src="../js/bootstrap-select.js"></script>
  99. <script src="../css/laydate/laydate.js"></script>
  100. <script src="../Script/Common/huayi.common.js"></script>
  101. <script>
  102. var wid = helper.request.queryString("wid");
  103. var type = helper.request.queryString("type");
  104. var state = helper.request.queryString("state");
  105. var depId = helper.request.queryString("depId");
  106. var pageName = helper.request.queryString("pageName");
  107. var level;
  108. $(document).ready(function() {
  109. laydate.skin("blue");
  110. laydate({
  111. elem: "#limittimes",
  112. event: "focus",
  113. istime: true,
  114. format: 'YYYY-MM-DD hh:mm:ss'
  115. });
  116. jbSelect($("#jbSelect"));
  117. if(type == 1) {
  118. if(state == 1) {
  119. $(".title").text("督办意见");
  120. $(".JC").hide();
  121. $(".superviseWay").show()
  122. if(pageName === "superviseUpcoming") {
  123. $('.whetherSupervise').show();
  124. } else if(pageName === "haveAduit") {
  125. $('.whetherSupervise').hide();
  126. }
  127. } else {
  128. $(".title").text("不督办意见");
  129. $(".JC").hide();
  130. $('.whetherSupervise').hide();
  131. }
  132. } else {
  133. $(".title").text("监察意见")
  134. $(".DB").hide();
  135. }
  136. if(wid) {
  137. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrderNew', {
  138. workorderid: wid,
  139. type: 0,
  140. "token": $.cookie("token")
  141. }, function(result) {
  142. if(result.state.toLowerCase() == "success") {
  143. var content = result.data;
  144. level = content.data[0].F_Level + ""
  145. if(pageName === "superviseUpcoming") {
  146. if(level === "1") {
  147. $(".limittimesWrapper").hide()
  148. $(".limittimeWrapper").show()
  149. } else {
  150. $(".limittimesWrapper").show()
  151. $(".limittimeWrapper").hide()
  152. }
  153. } else if(pageName === "haveAduit") {
  154. $('.whetherSupervise').hide();
  155. }
  156. }
  157. })
  158. }
  159. $(".DB").click(function() {
  160. console.log($('input[name="mj"]:checked').val())
  161. if($("#overseeopinion").val() == '') {
  162. layer.msg("意见不能为空");
  163. } else {
  164. type = 1;
  165. JA();
  166. }
  167. })
  168. $(".JC").click(function() {
  169. if($("#overseeopinion").val() == '') {
  170. layer.msg("意见不能为空");
  171. } else {
  172. type = 2;
  173. JA();
  174. }
  175. })
  176. //上传附件
  177. $("#scwj").click(function() {
  178. $("#upFile").trigger("click");
  179. })
  180. $("#upFile").change(function() {
  181. upload('upFile', '.fileBox', ['png', 'jpg', 'mp3', 'mp4', 'pdf', 'doc', 'docx', 'xls', 'xlsx'], "#file");
  182. })
  183. })
  184. $(".associatWorkOrder").click(function() {
  185. layer.open({
  186. type: 2,
  187. content: "./associatWorkOrder.html?wid=" + wid, //iframe的url,no代表不显示滚动条
  188. title: "关联工单",
  189. area: ["95%", "95%"], //宽高
  190. });
  191. });
  192. //发送短信
  193. function sendMessage() {
  194. $.post(huayi.config.callcenter_url + 'WorkOrder/SendSms', {
  195. workordercode: wid,
  196. deptid: depId, //承办单位
  197. type: 1,
  198. token: $.cookie("token")
  199. }, function(result) {
  200. result = JSON.parse(result);
  201. if(result.state.toLowerCase() == 'success') {
  202. layer.msg('发送短信成功')
  203. }
  204. })
  205. }
  206. //督察
  207. function JA() {
  208. $.post(huayi.config.callcenter_url + 'WorkOrder/RemindWorkOrder', {
  209. workorderid: wid,
  210. overseeopinion: $("#overseeopinion").val(),
  211. type: type,
  212. state: state,
  213. mode: $('input[name="mj"]:checked').val(),
  214. files: $("#file").val(),
  215. "token": $.cookie("token")
  216. }, function(result) {
  217. result = JSON.parse(result);
  218. if(result.state.toLowerCase() == "success") {
  219. parent.$('#orderlist').bootstrapTable('refresh');
  220. parent.layer.msg("操作成功");
  221. $('.fileBox').html('');
  222. console.log("state", state, typeof(state))
  223. if(state === "1") {
  224. if(pageName === "superviseUpcoming") {
  225. jb()
  226. } else if(pageName === "haveAduit") {
  227. hf()
  228. }
  229. } else {
  230. // $(' input[name="mj"]:checked ').val()
  231. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  232. parent.layer.close(index); //再执行关闭
  233. }
  234. }
  235. })
  236. }
  237. //上传文件
  238. // function upload() {
  239. // var Files = document.getElementById("upFile").files;
  240. // if (Files.length > 0) {
  241. // var formData = new FormData();
  242. // for (var i = 0; i < Files.length; i++) {
  243. // formData.append('file' + i, Files[i]);
  244. // }
  245. // formData.append("token", $.cookie("token"));
  246. // var typeName = Files[0].name.split('.')[1];
  247. // if (typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'mp3' || typeName ==
  248. // 'pdf' || typeName == 'doc' || typeName == 'docx' || typeName == 'xls' || typeName == 'xlsx') {
  249. // $.ajax({
  250. // url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  251. // type: "POST",
  252. // data: formData,
  253. // /**
  254. // *必须false才会自动加上正确的Content-Type
  255. // */
  256. // contentType: false,
  257. // /**
  258. // * 必须false才会避开jQuery对 formdata 的默认处理
  259. // * XMLHttpRequest会对 formdata 进行正确的处理
  260. // */
  261. // processData: false,
  262. // success: function (result) {
  263. // document.getElementById("upFile").outerHTML = document.getElementById("upFile")
  264. // .outerHTML;
  265. // $("#upFile").change(function () {
  266. // upload();
  267. // });
  268. // var r = $.parseJSON(result);
  269. // if (r.state.toLowerCase() == "success") {
  270. // $(".fjnr").text(r.data[0].F_FileName);
  271. // var a = r.data;
  272. //
  273. // $(a).each(function (i, n) {
  274. // var strs = '<span class="files" fiel-num="' + n.F_FileId +
  275. // '">' + n.F_FileName.substring(19) +
  276. // '<i class="fa fa-remove del_file"></i></span>'
  277. // $(strs).appendTo($('.fileBox')).find('.del_file').click(
  278. // function (event) {
  279. // event.stopPropagation();
  280. // $(this).parent().remove();
  281. // file_num();
  282. // })
  283. // })
  284. //
  285. // file_num();
  286. // }
  287. // }
  288. // });
  289. // } else {
  290. // layer.msg("格式不正确");
  291. // }
  292. // } else {
  293. // layer.confirm('请上传文件!', {
  294. // btn: ['确定']
  295. // });
  296. // }
  297. // }
  298. //
  299. // //上传文件隐藏域值
  300. // function file_num() {
  301. // var str = '';
  302. // var Str;
  303. // $('.fileBox .files').each(function (j, m) {
  304. // var aa = $(m).attr("fiel-num")
  305. // console.log(aa);
  306. // str += aa + ",";
  307. // Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  308. // })
  309. // $("#file").val(Str);
  310. // }
  311. //交办
  312. function jb() {
  313. var jbSelect = $("#jbSelect").val();
  314. var startTime = $("#startTime").val();
  315. var limittimes = $("#limittimes").val();
  316. layer.open({
  317. type: 2,
  318. content: "../CommonHtml/jiaoban.html?wid=" + wid + "&jbSelect=" + jbSelect + "&startTime=" +
  319. startTime + "&limittimes=" + limittimes + "&level=" + level, //iframe的url,no代表不显示滚动条
  320. title: '工单交办',
  321. area: ['95%', '95%'], //宽高
  322. });
  323. }
  324. //诉求回访
  325. function hf() {
  326. layer.open({
  327. type: 2,
  328. content: "../CommonHtml/Back.html?wid=" + wid, //iframe的url,no代表不显示滚动条
  329. title: '工单回访',
  330. area: ['95%', '95%'], //宽高
  331. });
  332. }
  333. function jbSelect(obj) {
  334. obj.empty();
  335. $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
  336. "token": $.cookie("token"),
  337. "iscbdw": 1,
  338. }, function(data) {
  339. if(data.state.toLowerCase() == "success") {
  340. var content = data.data;
  341. $("<option value=''>请选择</option>").appendTo(obj);
  342. $(content).each(function(i, n) {
  343. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
  344. })
  345. obj.selectpicker({
  346. noneSelectedText: '请选择' //默认显示内容
  347. });
  348. obj.selectpicker('refresh');
  349. }
  350. })
  351. }
  352. // 关闭弹出页
  353. function closePage() {
  354. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  355. parent.layer.close(index); //再执行关闭
  356. parent.$("#orderlist").bootstrapTable("refresh");
  357. parent.layer.msg("操作成功");
  358. }
  359. </script>
  360. </body>
  361. </html>