Açıklama Yok

Supervision_.html 13KB

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