商丘12345 前端

banli.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  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="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 {
  161. State = 0;
  162. JA();
  163. }
  164. })
  165. $('.Submit').click(function () {
  166. if ($("#dealman").val() == "") {
  167. layer.msg("办理人不能为空");
  168. } else if ($("#result").val() == "") {
  169. layer.msg("办理内容不能为空");
  170. } else {
  171. State = 1;
  172. JA();
  173. }
  174. })
  175. $(".prosituation-wrapper").hide(); //处理方案/进程
  176. $(".annotation-wrapper").hide(); //注释
  177. $(".dealcontact-wrapper").hide(); //联系方式
  178. $(".connecttime-wrapper").hide(); //沟通时间
  179. $(".connectmode-wrapper").hide(); //沟通方式
  180. $(".replycontent-wrapper").hide(); //答复内容
  181. $(".isstaisfied-wrapper").hide(); //是否满意
  182. /*
  183. * 处理结果
  184. * 默认 0
  185. * 是 1
  186. * 否 2
  187. */
  188. $('#isProResultRadio').find('input[type="radio"]').on('change', function() {
  189. $("#prosituation").val(""); //处理方案/进程
  190. $("#dealcontact").val(""); //联系方式
  191. $("#connecttime").val(""); //沟通时间
  192. $("#connectmode").val(""); //沟通方式
  193. $("#replycontent").val(""); //答复内容
  194. $('#isStaisfiedRadio input[name="isstaisfied"]:checked').prop("checked", false); //是否满意
  195. isProResultJudge($(this).val())
  196. });
  197. });
  198. //交办
  199. function JA() {
  200. $.post(huayi.config.callcenter_url + 'WorkOrder/FeedBackWorkOrder', {
  201. workorderid: wid,
  202. dealman: $("#dealman").val(), //承办人
  203. result: $("#result").val(), //办理内容
  204. isproresult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //处理结果
  205. prosituation: $("#prosituation").val(), //处理方案/进程
  206. dealcontact: $("#dealcontact").val(), //联系方式
  207. connecttime: $("#connecttime").val(), //沟通时间
  208. connectmode: $("#connectmode").val(), //沟通方式
  209. replycontent: $("#replycontent").val(), //答复内容
  210. isstaisfied: $('#isStaisfiedRadio input[name="isstaisfied"]:checked').val(), //是否满意
  211. state: State,
  212. feedbackid: a,
  213. files: $("#file").val(),
  214. token: $.cookie("token")
  215. }, function (result) {
  216. result = JSON.parse(result);
  217. if (result.state.toLowerCase() == "success") {
  218. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  219. parent.layer.close(index); //再执行关闭
  220. parent.$('#orderlist').bootstrapTable('refresh');
  221. parent.layer.msg("办理成功");
  222. $('.fileBox').html('');
  223. }
  224. })
  225. }
  226. //草稿详情
  227. function Detail() {
  228. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  229. workorderid: wid,
  230. type: 2,
  231. token: $.cookie("token")
  232. }, function (result) {
  233. if (result.state.toLowerCase() == "success") {
  234. if (result.data.length > 0) {
  235. var IsProResultValue = result.data[0].F_IsProResult + "";
  236. isProResultJudge(IsProResultValue);
  237. $("#dealman").val(result.data[0].F_DealUser); //承办人
  238. $("#result").val(result.data[0].F_Result); //办理内容
  239. $('#isProResultRadio input[name="isDisposeResult"][value="' + result.data[0].F_IsProResult +'"]').prop("checked", true);//是否有处理结果
  240. $("#prosituation").val(result.data[0].F_ProSituation); //处理方案/进程
  241. $("#dealcontact").val(result.data[0].F_DealUserContact); //联系方式
  242. $("#connecttime").val(result.data[0].F_ConnectTime); //沟通时间
  243. $("#connectmode").val(result.data[0].F_ConnectMode); //沟通方式
  244. $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
  245. $('#isStaisfiedRadio input[name="isstaisfied"][value="' + result.data[0].F_IsSatisfied +'"]').prop("checked", true); //是否满意
  246. a = result.data[0].F_Id;
  247. };
  248. }
  249. })
  250. }
  251. //清除
  252. function Clean() {
  253. $("#startTime").val(''),
  254. $('#assignedopinion').val('')
  255. }
  256. //上传文件
  257. function upload() {
  258. var Files = document.getElementById("upFile").files;
  259. if (Files.length > 0) {
  260. var formData = new FormData();
  261. for (var i = 0; i < Files.length; i++) {
  262. formData.append('file' + i, Files[i]);
  263. }
  264. formData.append("token", $.cookie("token"));
  265. var typeName=Files[0].name.split('.')[1];
  266. if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
  267. $.ajax({
  268. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  269. type: "POST",
  270. data: formData,
  271. /**
  272. *必须false才会自动加上正确的Content-Type
  273. */
  274. contentType: false,
  275. /**
  276. * 必须false才会避开jQuery对 formdata 的默认处理
  277. * XMLHttpRequest会对 formdata 进行正确的处理
  278. */
  279. processData: false,
  280. success: function (result) {
  281. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  282. $("#upFile").change(function () {
  283. upload();
  284. });
  285. var r = $.parseJSON(result);
  286. if (r.state.toLowerCase() == "success") {
  287. $(".fjnr").text(r.data[0].F_FileName);
  288. var a = r.data;
  289. $(a).each(function (i, n) {
  290. var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
  291. $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
  292. event.stopPropagation();
  293. $(this).parent().remove();
  294. file_num()
  295. })
  296. })
  297. file_num();
  298. }
  299. }
  300. });
  301. }else{
  302. layer.msg("格式不正确");
  303. }
  304. } else {
  305. layer.confirm('请上传文件!', {
  306. btn: ['确定']
  307. });
  308. }
  309. }
  310. //上传文件隐藏域值
  311. function file_num() {
  312. var str = '';
  313. var Str;
  314. $('.fileBox .files').each(function (j, m) {
  315. var aa = $(m).attr("fiel-num")
  316. console.log(aa);
  317. str += aa + ",";
  318. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  319. })
  320. $("#file").val(Str);
  321. }
  322. // 处理结果判断
  323. function isProResultJudge (isProResultdata) {
  324. if(isProResultdata === '1') {
  325. if (isProtect === "1" ) {
  326. $(".prosituation-wrapper").hide(); //处理方案/进程
  327. $(".annotation-wrapper").hide(); //注释
  328. $(".dealcontact-wrapper").show(); //联系方式
  329. $(".connecttime-wrapper").hide(); //沟通时间
  330. $(".connectmode-wrapper").hide(); //沟通方式
  331. $(".replycontent-wrapper").hide(); //答复内容
  332. $(".isstaisfied-wrapper").hide(); //是否满意
  333. } else if (isProtect === "0") {
  334. $(".prosituation-wrapper").hide(); //处理方案/进程
  335. $(".annotation-wrapper").hide(); //注释
  336. $(".dealcontact-wrapper").hide(); //联系方式
  337. $(".connecttime-wrapper").show(); //沟通时间
  338. $(".connectmode-wrapper").show(); //沟通方式
  339. $(".replycontent-wrapper").show(); //答复内容
  340. $(".isstaisfied-wrapper").show(); //是否满意
  341. }
  342. } else if (isProResultdata === '2') {
  343. $(".prosituation-wrapper").show(); //处理方案/进程
  344. $(".annotation-wrapper").show(); //注释
  345. $(".dealcontact-wrapper").hide(); //联系方式
  346. $(".connecttime-wrapper").hide(); //沟通时间
  347. $(".connectmode-wrapper").hide(); //沟通方式
  348. $(".replycontent-wrapper").hide(); //答复内容
  349. $(".isstaisfied-wrapper").hide(); //是否满意
  350. }
  351. }
  352. </script>
  353. </body>
  354. </html>