商丘12345 前端

banli.html 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  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 href="../css/layer/need/layer.css" />
  8. <link rel="stylesheet" href="../css/init.css" />
  9. <title>办理工单</title>
  10. <style>
  11. .input {
  12. background-color: #FFF;
  13. background-image: none;
  14. border: 1px solid #ccc;
  15. border-radius: 1px;
  16. color: inherit;
  17. padding: 6px 12px
  18. }
  19. .fjnr {
  20. padding: 0 !important;
  21. border: none !important;
  22. }
  23. </style>
  24. </head>
  25. <body>
  26. <div class="Common">
  27. <table>
  28. <tr>
  29. <th class="Importent">办理人:</th>
  30. <td> <input id="dealman" type="text" style="height: 32px;"></td>
  31. </tr>
  32. <tr>
  33. <th class="Importent">办理内容:</th>
  34. <td>
  35. <textarea data-adaptheight id="result" name="" rows="6" cols="" ></textarea>
  36. <!--20 年 月 日, 政务 街道/ 单位 部门
  37. 接到12345热线工单(编号: ) 来电人反映的 。经落实,具体情况回复如下:
  38. 办理结果:
  39. 承办人:
  40. 职务:
  41. 联系电话:-->
  42. </td>
  43. <input type="hidden" id="ID" />
  44. </tr>
  45. <tr>
  46. <th>是否有处理结果:</th>
  47. <td id="isProResultRadio" style="font-size: 12px">
  48. <label style="margin-right: 10px">
  49. <input type="radio" value="0" name="isDisposeResult" style="vertical-align: -2px;" checked="checked" />默认
  50. </label>
  51. <label style="margin-right: 10px">
  52. <input type="radio" value="1" name="isDisposeResult" style="vertical-align: -2px;" />是
  53. </label>
  54. <label>
  55. <input type="radio" value="2" name="isDisposeResult" style="vertical-align: -2px;" />否
  56. </label>
  57. </td>
  58. </tr>
  59. <tr class="prosituation-wrapper">
  60. <th>处理方案/进程:</th>
  61. <td>
  62. <textarea data-adaptheight id="prosituation" name="" rows="6" cols="" ></textarea>
  63. </td>
  64. </tr>
  65. <tr class="annotation-wrapper">
  66. <th style="color:#FF0000;">注释:</th>
  67. <td style="color:#FF0000">请提交加盖单位公章的相关说明文件</td>
  68. </tr>
  69. <tr class="dealcontact-wrapper">
  70. <th>联系方式:</th>
  71. <td>
  72. <input type="text" id="dealcontact">
  73. </td>
  74. </tr>
  75. <tr class="connecttime-wrapper">
  76. <th>沟通时间:</th>
  77. <td>
  78. <input type="text" id="connecttime">
  79. </td>
  80. </tr>
  81. <tr class="connectmode-wrapper">
  82. <th>沟通方式:</th>
  83. <td>
  84. <input type="text" id="connectmode">
  85. </td>
  86. </tr>
  87. <tr class="replycontent-wrapper">
  88. <th>答复内容:</th>
  89. <td>
  90. <input type="text" id="replycontent">
  91. </td>
  92. </tr>
  93. <tr class="isstaisfied-wrapper">
  94. <th>是否满意:</th>
  95. <td id="isStaisfiedRadio" style="font-size: 12px">
  96. <label style="margin-right: 10px;">
  97. <input type="radio" value="1" name="isstaisfied" style="vertical-align: -2px;" checked="checked" />满意
  98. </label>
  99. <label style="margin-right: 10px;">
  100. <input type="radio" value="2" name="isstaisfied" style="vertical-align: -2px;" />基本满意
  101. </label>
  102. <label style="margin-right: 10px;">
  103. <input type="radio" value="3" name="isstaisfied" style="vertical-align: -2px;" />不满意
  104. </label>
  105. </td>
  106. </tr>
  107. <tr class="files-wrappper">
  108. <th class="Importent">附件:</th>
  109. <td>
  110. <div class="fileBox">
  111. </div>
  112. <!--<span class="fjnr"></span>-->
  113. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  114. <input class="input" type="button" value="上传" id="scwj" />
  115. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  116. <input type="hidden" id="file" />
  117. <span style="color:#FF0000; border: none;">
  118. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  119. </span>
  120. </td>
  121. </tr>
  122. </table>
  123. <div class="btn_box">
  124. <button class="btns BC">保存</button>
  125. <button class="btns Submit">保存并办理</button>
  126. </div>
  127. </div>
  128. <script src="../css/laydate/laydate.js"></script>
  129. <script src="../js/adjustHeight.js"></script>
  130. <script>
  131. var wid = helper.request.queryString("wid");
  132. var isProtect = helper.request.queryString("isProtect");
  133. console.log("isProtect1111",isProtect)
  134. var State;
  135. var a = $("#ID").val()
  136. Detail();
  137. $(document).ready(function () {
  138. //上传附件
  139. $("#scwj").click(function () {
  140. $("#upFile").trigger("click");
  141. })
  142. $("#upFile").change(function () {
  143. upload();
  144. })
  145. $("#scfj").click(function () {
  146. $(".fjnr").text("");
  147. $("#scfj").hide();
  148. })
  149. $('.BC').click(function () {
  150. if ($("#dealman").val() == "") {
  151. layer.msg("办理人不能为空");
  152. } else if ($("#result").val() == "") {
  153. layer.msg("办理内容不能为空");
  154. } else {
  155. State = 0;
  156. JA();
  157. }
  158. })
  159. $('.Submit').click(function () {
  160. if ($("#dealman").val() == "") {
  161. layer.msg("办理人不能为空");
  162. } else if ($("#result").val() == "") {
  163. layer.msg("办理内容不能为空");
  164. } else {
  165. State = 1;
  166. JA();
  167. }
  168. })
  169. $(".prosituation-wrapper").hide(); //处理方案/进程
  170. $(".annotation-wrapper").hide(); //注释
  171. $(".dealcontact-wrapper").hide(); //联系方式
  172. $(".connecttime-wrapper").hide(); //沟通时间
  173. $(".connectmode-wrapper").hide(); //沟通方式
  174. $(".replycontent-wrapper").hide(); //答复内容
  175. $(".isstaisfied-wrapper").hide(); //是否满意
  176. /*
  177. * 处理结果
  178. * 默认 0
  179. * 是 1
  180. * 否 2
  181. */
  182. $('#isProResultRadio').find('input[type="radio"]').on('change', function() {
  183. if($(this).val() === '0') {
  184. $(".prosituation-wrapper").hide(); //处理方案/进程
  185. $(".annotation-wrapper").hide(); //注释
  186. $(".dealcontact-wrapper").hide(); //联系方式
  187. $(".connecttime-wrapper").hide(); //沟通时间
  188. $(".connectmode-wrapper").hide(); //沟通方式
  189. $(".replycontent-wrapper").hide(); //答复内容
  190. $(".isstaisfied-wrapper").hide(); //是否满意
  191. } else if($(this).val() === '1') {
  192. if (isProtect === "1" ) {
  193. $(".prosituation-wrapper").hide(); //处理方案/进程
  194. $(".annotation-wrapper").hide(); //注释
  195. $(".dealcontact-wrapper").show(); //联系方式
  196. $(".connecttime-wrapper").hide(); //沟通时间
  197. $(".connectmode-wrapper").hide(); //沟通方式
  198. $(".replycontent-wrapper").hide(); //答复内容
  199. $(".isstaisfied-wrapper").hide(); //是否满意
  200. } else if (isProtect === "0") {
  201. $(".prosituation-wrapper").hide(); //处理方案/进程
  202. $(".annotation-wrapper").hide(); //注释
  203. $(".dealcontact-wrapper").hide(); //联系方式
  204. $(".connecttime-wrapper").show(); //沟通时间
  205. $(".connectmode-wrapper").show(); //沟通方式
  206. $(".replycontent-wrapper").show(); //答复内容
  207. $(".isstaisfied-wrapper").show(); //是否满意
  208. }
  209. } else if ($(this).val() === '2') {
  210. $(".prosituation-wrapper").show(); //处理方案/进程
  211. $(".annotation-wrapper").show(); //注释
  212. $(".dealcontact-wrapper").hide(); //联系方式
  213. $(".connecttime-wrapper").hide(); //沟通时间
  214. $(".connectmode-wrapper").hide(); //沟通方式
  215. $(".replycontent-wrapper").hide(); //答复内容
  216. $(".isstaisfied-wrapper").hide(); //是否满意
  217. }
  218. });
  219. });
  220. //交办
  221. function JA() {
  222. $.post(huayi.config.callcenter_url + 'WorkOrder/FeedBackWorkOrder', {
  223. workorderid: wid,
  224. dealman: $("#dealman").val(), //办理人
  225. result: $("#result").val(), //办理内容
  226. isproresult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //处理结果
  227. prosituation: $("#prosituation").val(), //处理方案/进程
  228. dealcontact: $("#dealcontact").val(), //联系方式
  229. connecttime: $("#connecttime").val(), //沟通时间
  230. connectmode: $("#connectmode").val(), //沟通方式
  231. replycontent: $("#replycontent").val(), //答复内容
  232. isstaisfied: $('#isStaisfiedRadio input[name="isstaisfied"]:checked').val(), //是否满意
  233. state: State,
  234. feedbackid: a,
  235. files: $("#file").val(),
  236. token: $.cookie("token")
  237. }, function (result) {
  238. result = JSON.parse(result);
  239. if (result.state.toLowerCase() == "success") {
  240. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  241. parent.layer.close(index); //再执行关闭
  242. parent.$('#orderlist').bootstrapTable('refresh');
  243. parent.layer.msg("办理成功");
  244. $('.fileBox').html('');
  245. }
  246. })
  247. }
  248. //草稿详情
  249. function Detail() {
  250. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  251. workorderid: wid,
  252. type: 2,
  253. token: $.cookie("token")
  254. }, function (result) {
  255. if (result.state.toLowerCase() == "success") {
  256. if (result.data.length > 0) {
  257. $("#dealman").val(result.data[0].F_DealUser);
  258. $('#result').val(result.data[0].F_Result);
  259. a = result.data[0].F_Id;
  260. };
  261. }
  262. })
  263. }
  264. //清除
  265. function Clean() {
  266. $("#startTime").val(''),
  267. $('#assignedopinion').val('')
  268. }
  269. //上传文件
  270. function upload() {
  271. var Files = document.getElementById("upFile").files;
  272. if (Files.length > 0) {
  273. var formData = new FormData();
  274. for (var i = 0; i < Files.length; i++) {
  275. formData.append('file' + i, Files[i]);
  276. }
  277. formData.append("token", $.cookie("token"));
  278. var typeName=Files[0].name.split('.')[1];
  279. if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
  280. $.ajax({
  281. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  282. type: "POST",
  283. data: formData,
  284. /**
  285. *必须false才会自动加上正确的Content-Type
  286. */
  287. contentType: false,
  288. /**
  289. * 必须false才会避开jQuery对 formdata 的默认处理
  290. * XMLHttpRequest会对 formdata 进行正确的处理
  291. */
  292. processData: false,
  293. success: function (result) {
  294. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  295. $("#upFile").change(function () {
  296. upload();
  297. });
  298. var r = $.parseJSON(result);
  299. if (r.state.toLowerCase() == "success") {
  300. $(".fjnr").text(r.data[0].F_FileName);
  301. var a = r.data;
  302. $(a).each(function (i, n) {
  303. var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
  304. $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
  305. event.stopPropagation();
  306. $(this).parent().remove();
  307. file_num()
  308. })
  309. })
  310. file_num();
  311. }
  312. }
  313. });
  314. }else{
  315. layer.msg("格式不正确");
  316. }
  317. } else {
  318. layer.confirm('请上传文件!', {
  319. btn: ['确定']
  320. });
  321. }
  322. }
  323. //上传文件隐藏域值
  324. function file_num() {
  325. var str = '';
  326. var Str;
  327. $('.fileBox .files').each(function (j, m) {
  328. var aa = $(m).attr("fiel-num")
  329. console.log(aa);
  330. str += aa + ",";
  331. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  332. })
  333. $("#file").val(Str);
  334. }
  335. </script>
  336. </body>
  337. </html>