Brak opisu

XGBL.html 13KB

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