Brak opisu

Supervision_.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  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"
  48. style="display: none;">
  49. <input class="input" type="button" value="上传" id="scwj" />
  50. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  51. <input type="hidden" id="file" />
  52. <span style="color:#FF0000; border: none;">
  53. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  54. </span>
  55. </td>
  56. </tr>
  57. <tr class="whetherSupervise">
  58. <th>交办单位:</th>
  59. <td colspan="1">
  60. <select id="jbSelect" name="select" class="selectpicker show-tick form-control" multiple
  61. data-live-search="true">
  62. </select>
  63. </td>
  64. </tr>
  65. <tr class="whetherSupervise superviseWay">
  66. <th>督办方式:</th>
  67. <td colspan="">
  68. <input class="radioStyle" type="radio" name="mj" value="0" />
  69. <span>现场</span>
  70. <input class="radioStyle" type="radio" name="mj" value="1" checked="checked" />
  71. <span>电话</span>
  72. </td>
  73. </tr>
  74. <tr class="whetherSupervise limittimeWrapper">
  75. <th>办理时限:</th>
  76. <td colspan="">
  77. <select class="startTime" id="startTime" style="width: 200px; height: 30px; line-height: 30px;">
  78. <!--<option value="0">选择</option>-->
  79. <option value="1">一天</option>
  80. <option value="3">三天</option>
  81. <option value="5">五天</option>
  82. <option value="7">七天</option>
  83. </select>
  84. </td>
  85. </tr>
  86. <tr class="whetherSupervise limittimesWrapper" >
  87. <th>紧急时限:</th>
  88. <td colspan="">
  89. <input type="text" id="limittimes">
  90. </td>
  91. </tr>
  92. </table>
  93. <div class="btn_box">
  94. <button class="btns DB">保存</button>
  95. <button class="btns JC">保存</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. //发送短信
  186. function sendMessage() {
  187. $.post(huayi.config.callcenter_url + 'WorkOrder/SendSms', {
  188. workordercode: wid,
  189. deptid: depId, //承办单位
  190. type: 1,
  191. token: $.cookie("token")
  192. }, function (result) {
  193. result = JSON.parse(result);
  194. if (result.state.toLowerCase() == 'success') {
  195. layer.msg('发送短信成功')
  196. }
  197. })
  198. }
  199. //督察
  200. function JA() {
  201. $.post(huayi.config.callcenter_url + 'WorkOrder/RemindWorkOrder', {
  202. workorderid: wid,
  203. overseeopinion: $("#overseeopinion").val(),
  204. type: type,
  205. state: state,
  206. mode:$('input[name="mj"]:checked').val(),
  207. files: $("#file").val(),
  208. "token": $.cookie("token")
  209. }, function (result) {
  210. result = JSON.parse(result);
  211. if (result.state.toLowerCase() == "success") {
  212. parent.$('#orderlist').bootstrapTable('refresh');
  213. parent.layer.msg("操作成功");
  214. $('.fileBox').html('');
  215. console.log("state", state, typeof (state))
  216. if (state === "1") {
  217. if (pageName === "superviseUpcoming") {
  218. jb()
  219. } else if (pageName === "haveAduit") {
  220. hf()
  221. }
  222. } else {
  223. // $(' input[name="mj"]:checked ').val()
  224. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  225. parent.layer.close(index); //再执行关闭
  226. }
  227. }
  228. })
  229. }
  230. //上传文件
  231. // function upload() {
  232. // var Files = document.getElementById("upFile").files;
  233. // if (Files.length > 0) {
  234. // var formData = new FormData();
  235. // for (var i = 0; i < Files.length; i++) {
  236. // formData.append('file' + i, Files[i]);
  237. // }
  238. // formData.append("token", $.cookie("token"));
  239. // var typeName = Files[0].name.split('.')[1];
  240. // if (typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'mp3' || typeName ==
  241. // 'pdf' || typeName == 'doc' || typeName == 'docx' || typeName == 'xls' || typeName == 'xlsx') {
  242. // $.ajax({
  243. // url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  244. // type: "POST",
  245. // data: formData,
  246. // /**
  247. // *必须false才会自动加上正确的Content-Type
  248. // */
  249. // contentType: false,
  250. // /**
  251. // * 必须false才会避开jQuery对 formdata 的默认处理
  252. // * XMLHttpRequest会对 formdata 进行正确的处理
  253. // */
  254. // processData: false,
  255. // success: function (result) {
  256. // document.getElementById("upFile").outerHTML = document.getElementById("upFile")
  257. // .outerHTML;
  258. // $("#upFile").change(function () {
  259. // upload();
  260. // });
  261. // var r = $.parseJSON(result);
  262. // if (r.state.toLowerCase() == "success") {
  263. // $(".fjnr").text(r.data[0].F_FileName);
  264. // var a = r.data;
  265. //
  266. // $(a).each(function (i, n) {
  267. // var strs = '<span class="files" fiel-num="' + n.F_FileId +
  268. // '">' + n.F_FileName.substring(19) +
  269. // '<i class="fa fa-remove del_file"></i></span>'
  270. // $(strs).appendTo($('.fileBox')).find('.del_file').click(
  271. // function (event) {
  272. // event.stopPropagation();
  273. // $(this).parent().remove();
  274. // file_num();
  275. // })
  276. // })
  277. //
  278. // file_num();
  279. // }
  280. // }
  281. // });
  282. // } else {
  283. // layer.msg("格式不正确");
  284. // }
  285. // } else {
  286. // layer.confirm('请上传文件!', {
  287. // btn: ['确定']
  288. // });
  289. // }
  290. // }
  291. //
  292. // //上传文件隐藏域值
  293. // function file_num() {
  294. // var str = '';
  295. // var Str;
  296. // $('.fileBox .files').each(function (j, m) {
  297. // var aa = $(m).attr("fiel-num")
  298. // console.log(aa);
  299. // str += aa + ",";
  300. // Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  301. // })
  302. // $("#file").val(Str);
  303. // }
  304. //交办
  305. function jb() {
  306. var jbSelect = $("#jbSelect").val();
  307. var startTime = $("#startTime").val();
  308. var limittimes = $("#limittimes").val();
  309. layer.open({
  310. type: 2,
  311. content: "../CommonHtml/jiaoban.html?wid=" + wid + "&jbSelect=" + jbSelect + "&startTime=" +
  312. startTime + "&limittimes=" + limittimes + "&level=" + level, //iframe的url,no代表不显示滚动条
  313. title: '工单交办',
  314. area: ['95%', '95%'], //宽高
  315. });
  316. }
  317. //诉求回访
  318. function hf() {
  319. layer.open({
  320. type: 2,
  321. content: "../CommonHtml/Back.html?wid=" + wid, //iframe的url,no代表不显示滚动条
  322. title: '工单回访',
  323. area: ['95%', '95%'], //宽高
  324. });
  325. }
  326. function jbSelect(obj) {
  327. obj.empty();
  328. $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
  329. "token": $.cookie("token"),
  330. "iscbdw": 1,
  331. }, function (data) {
  332. if (data.state.toLowerCase() == "success") {
  333. var content = data.data;
  334. $("<option value=''>请选择</option>").appendTo(obj);
  335. $(content).each(function (i, n) {
  336. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(obj);
  337. })
  338. obj.selectpicker({
  339. noneSelectedText: '请选择' //默认显示内容
  340. });
  341. obj.selectpicker('refresh');
  342. }
  343. })
  344. }
  345. // 关闭弹出页
  346. function closePage() {
  347. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  348. parent.layer.close(index); //再执行关闭
  349. parent.$("#orderlist").bootstrapTable("refresh");
  350. parent.layer.msg("操作成功");
  351. }
  352. </script>
  353. </body>
  354. </html>