商丘12345 前端

banli.html 16KB

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