商丘12345 前端

banli.html 16KB

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