商丘12345 前端

banli.html 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  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="situation" name="" rows="6" cols=""></textarea>
  46. </td>
  47. </tr>
  48. <tr>
  49. <th class="Importent">是否有处理结果:</th>
  50. <td id="isProResultRadio" style="font-size: 12px">
  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 colspan="5">
  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" colspan="5">请提交加盖单位公章的相关说明文件,不添加文件说明将被扣考核分</td>
  68. </tr>
  69. <tr class="connecttime-wrapper">
  70. <th>沟通时间:</th>
  71. <td>
  72. <input type="text" class="laydate-icon" id="connecttime" style="width: 172px; height: 32px; border-color: rgb(158, 158, 158);">
  73. </td>
  74. </tr>
  75. <tr class="connectmode-wrapper">
  76. <th>沟通方式:</th>
  77. <td>
  78. <input type="text" id="connectmode">
  79. </td>
  80. </tr>
  81. <tr class="isstaisfied-wrapper">
  82. <th>是否满意:</th>
  83. <td id="isStaisfiedRadio" style="font-size: 12px" colspan="5">
  84. <label style="margin-right: 10px;">
  85. <input type="radio" value="1" name="isstaisfied" style="vertical-align: -2px;" />满意
  86. </label>
  87. <label style="margin-right: 10px;">
  88. <input type="radio" value="2" name="isstaisfied" style="vertical-align: -2px;" />基本满意
  89. </label>
  90. <label style="margin-right: 10px;">
  91. <input type="radio" value="3" name="isstaisfied" style="vertical-align: -2px;" />不满意
  92. </label>
  93. </td>
  94. </tr>
  95. <tr class="files-wrappper">
  96. <th class="Importent">附件:</th>
  97. <td colspan="5">
  98. <div class="fileBox">
  99. </div>
  100. <!--<span class="fjnr"></span>-->
  101. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  102. <input class="input" type="button" value="上传" id="scwj" />
  103. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  104. <input type="hidden" id="file" />
  105. <span style="color:#FF0000; border: none;">
  106. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  107. </span>
  108. </td>
  109. </tr>
  110. <tr>
  111. <td><button class="btns handleBtn">查看办理结果</button></td>
  112. <td colspan="5">
  113. <textarea data-adaptheight id="result" name="" rows="4" cols=""></textarea>
  114. </td>
  115. <input type="hidden" id="ID" />
  116. </tr>
  117. </table>
  118. <div class="btn_box">
  119. <button class="btns BC">保存</button>
  120. <button class="btns Submit">保存并办理</button>
  121. </div>
  122. </div>
  123. <script src="../css/laydate/laydate.js"></script>
  124. <script src="../js/adjustHeight.js"></script>
  125. <script>
  126. var wid = helper.request.queryString("wid");
  127. var isProtect = helper.request.queryString("isProtect");
  128. var State;
  129. var a = $("#ID").val();
  130. var simpleDetailStrStart = "";
  131. var simpleDetailStrEnd = "";
  132. var simpleDetailStr = "";
  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. simpleDetail();
  145. //上传附件
  146. $("#scwj").click(function () {
  147. $("#upFile").trigger("click");
  148. })
  149. $("#upFile").change(function () {
  150. upload();
  151. })
  152. $("#scfj").click(function () {
  153. $(".fjnr").text("");
  154. $("#scfj").hide();
  155. })
  156. $('.BC').click(function () {
  157. if ($("#dealman").val() == "") {
  158. layer.msg("办理人不能为空");
  159. } else if ($("#situation").val() == "") {
  160. layer.msg("处理结果不能为空");
  161. } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == null) {
  162. layer.msg("处理结果不能为空");
  163. } else if ($("#dealcontact").val() == "") {
  164. layer.msg("联系方式不能为空")
  165. } else if ($("#duties").val() == "") {
  166. layer.msg("职务不能为空")
  167. } else if ($("#result").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 ($("#situation").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 if ($("#result").val() == "") {
  186. layer.msg("请生成办理结果")
  187. } else {
  188. State = 1;
  189. JA();
  190. }
  191. })
  192. $(".prosituation-wrapper").hide(); //处理方案/进程
  193. $(".annotation-wrapper").hide(); //注释
  194. $(".connecttime-wrapper").hide(); //沟通时间
  195. $(".connectmode-wrapper").hide(); //沟通方式
  196. // $(".replycontent-wrapper").hide(); //答复内容
  197. $(".isstaisfied-wrapper").hide(); //是否满意
  198. /*
  199. * 处理结果
  200. * 默认 0
  201. * 是 1
  202. * 否 2
  203. */
  204. $('#isProResultRadio').find('input[type="radio"]').on('change', function() {
  205. $("#prosituation").val(""); //处理方案/进程
  206. $("#connecttime").val(""); //沟通时间
  207. $("#connectmode").val(""); //沟通方式
  208. // $("#replycontent").val(""); //答复内容
  209. $("#result").val(""); //办理结果
  210. $('#isStaisfiedRadio input[name="isstaisfied"]:checked').prop("checked", false); //是否满意
  211. isProResultJudge($(this).val())
  212. });
  213. $('.handleBtn').click(function() {
  214. if($('#isProResultRadio input[name="isDisposeResult"]:checked').val() === '1') {
  215. if (isProtect === "1" ) {
  216. simpleDetailStrEnd = "经落实,具体情况回复如下:" + $("#situation").val() + " 办理结果:" + "已办理 承办人:" + $("#dealman").val() + " 职务:" + $("#duties").val() + " 联系电话:" + $("#dealcontact").val()
  217. simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  218. $("#result").val(simpleDetailStr);
  219. } else if (isProtect === "0") {
  220. if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() === "0") {
  221. var isStaisfiedRadioData = "未评价";
  222. } else if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() === "1") {
  223. var isStaisfiedRadioData = "满意";
  224. } else if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() === "2") {
  225. var isStaisfiedRadioData = "基本满意";
  226. } else if ($('#isStaisfiedRadio input[name="isstaisfied"]:checked').val() === "3") {
  227. var isStaisfiedRadioData = "不满意";
  228. } else {
  229. var isStaisfiedRadioData = "未评价";
  230. }
  231. simpleDetailStrEnd = "经落实,具体情况回复如下:" + $("#situation").val() + " 办理结果:" + "已办理 承办人:" + $("#dealman").val() + " 职务:" + $("#duties").val() + " 联系电话:" + $("#dealcontact").val() + "; " + $("#dealman").val() + "用" + $("#connectmode").val() + "方式在" + $("#connecttime").val() + "对反映人进行了回复,反映人对结果表示" + isStaisfiedRadioData
  232. simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  233. $("#result").val(simpleDetailStr);
  234. }
  235. } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() === '2') {
  236. simpleDetailStrEnd = "经落实,具体情况回复如下:" + $("#situation").val() + " 办理结果:" + "未办理 承办人:" + $("#dealman").val() + " 职务:" + $("#duties").val() + " 联系电话:" + $("#dealcontact").val() + "; 处理方案/进程:" + $("#prosituation").val();
  237. simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  238. $("#result").val(simpleDetailStr);
  239. } else {
  240. simpleDetailStr = simpleDetailStrStart + simpleDetailStrEnd;
  241. $("#result").val(simpleDetailStr);
  242. }
  243. })
  244. });
  245. //交办
  246. function JA() {
  247. $.post(huayi.config.callcenter_url + 'WorkOrder/FeedBackWorkOrder', {
  248. workorderid: wid,
  249. dealman: $("#dealman").val(), //承办人
  250. dealcontact: $("#dealcontact").val(), //联系方式
  251. duties: $("#duties").val(), //职务
  252. situation: $("#situation").val(), //处理情况
  253. result: $("#result").val(), //办理结果
  254. isproresult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //处理结果
  255. prosituation: $("#prosituation").val(), //处理方案/进程
  256. connecttime: $("#connecttime").val(), //沟通时间
  257. connectmode: $("#connectmode").val(), //沟通方式
  258. // replycontent: $("#replycontent").val(), //答复内容
  259. isstaisfied: $('#isStaisfiedRadio input[name="isstaisfied"]:checked').val(), //是否满意
  260. state: State,
  261. feedbackid: a,
  262. files: $("#file").val(),
  263. token: $.cookie("token")
  264. }, function (result) {
  265. result = JSON.parse(result);
  266. if (result.state.toLowerCase() == "success") {
  267. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  268. parent.layer.close(index); //再执行关闭
  269. parent.$('#orderlist').bootstrapTable('refresh');
  270. parent.layer.msg("办理成功");
  271. $('.fileBox').html('');
  272. }
  273. })
  274. }
  275. //草稿详情
  276. function Detail() {
  277. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  278. workorderid: wid,
  279. type: 2,
  280. token: $.cookie("token")
  281. }, function (result) {
  282. if (result.state.toLowerCase() == "success") {
  283. if (result.data.length > 0) {
  284. var IsProResultValue = result.data[0].F_IsProResult + "";
  285. isProResultJudge(IsProResultValue);
  286. $("#dealman").val(result.data[0].F_DealUser); //承办人
  287. // $("#result").text(result.data[0].F_Result); //办理结果
  288. $("#situation").val(result.data[0].F_Situation); //处理情况
  289. $("#duties").val(result.data[0].F_Duties); //职务
  290. $('#isProResultRadio input[name="isDisposeResult"][value="' + result.data[0].F_IsProResult +'"]').prop("checked", true);//是否有处理结果
  291. $("#prosituation").val(result.data[0].F_ProSituation); //处理方案/进程
  292. $("#dealcontact").val(result.data[0].F_DealUserContact); //联系方式
  293. $("#connecttime").val(result.data[0].F_ConnectTime); //沟通时间
  294. $("#connectmode").val(result.data[0].F_ConnectMode); //沟通方式
  295. // $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
  296. $('#isStaisfiedRadio input[name="isstaisfied"][value="' + result.data[0].F_IsSatisfied +'"]').prop("checked", true); //是否满意
  297. a = result.data[0].F_Id;
  298. };
  299. }
  300. })
  301. }
  302. //清除
  303. function Clean() {
  304. $("#startTime").val(''),
  305. $('#assignedopinion').val('')
  306. }
  307. //上传文件
  308. function upload() {
  309. var Files = document.getElementById("upFile").files;
  310. if (Files.length > 0) {
  311. var formData = new FormData();
  312. for (var i = 0; i < Files.length; i++) {
  313. formData.append('file' + i, Files[i]);
  314. }
  315. formData.append("token", $.cookie("token"));
  316. var typeName=Files[0].name.split('.')[1];
  317. if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
  318. $.ajax({
  319. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  320. type: "POST",
  321. data: formData,
  322. /**
  323. *必须false才会自动加上正确的Content-Type
  324. */
  325. contentType: false,
  326. /**
  327. * 必须false才会避开jQuery对 formdata 的默认处理
  328. * XMLHttpRequest会对 formdata 进行正确的处理
  329. */
  330. processData: false,
  331. success: function (result) {
  332. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  333. $("#upFile").change(function () {
  334. upload();
  335. });
  336. var r = $.parseJSON(result);
  337. if (r.state.toLowerCase() == "success") {
  338. $(".fjnr").text(r.data[0].F_FileName);
  339. var a = r.data;
  340. $(a).each(function (i, n) {
  341. var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
  342. $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
  343. event.stopPropagation();
  344. $(this).parent().remove();
  345. file_num()
  346. })
  347. })
  348. file_num();
  349. }
  350. }
  351. });
  352. }else{
  353. layer.msg("格式不正确");
  354. }
  355. } else {
  356. layer.confirm('请上传文件!', {
  357. btn: ['确定']
  358. });
  359. }
  360. }
  361. //上传文件隐藏域值
  362. function file_num() {
  363. var str = '';
  364. var Str;
  365. $('.fileBox .files').each(function (j, m) {
  366. var aa = $(m).attr("fiel-num")
  367. console.log(aa);
  368. str += aa + ",";
  369. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  370. })
  371. $("#file").val(Str);
  372. }
  373. // 处理结果判断
  374. function isProResultJudge (isProResultdata) {
  375. if(isProResultdata === '1') {
  376. if (isProtect === "1" ) {
  377. $(".prosituation-wrapper").hide(); //处理方案/进程
  378. $(".annotation-wrapper").hide(); //注释
  379. $(".connecttime-wrapper").hide(); //沟通时间
  380. $(".connectmode-wrapper").hide(); //沟通方式
  381. // $(".replycontent-wrapper").hide(); //答复内容
  382. $(".isstaisfied-wrapper").hide(); //是否满意
  383. } else if (isProtect === "0") {
  384. $(".prosituation-wrapper").hide(); //处理方案/进程
  385. $(".annotation-wrapper").hide(); //注释
  386. $(".connecttime-wrapper").show(); //沟通时间
  387. $(".connectmode-wrapper").show(); //沟通方式
  388. // $(".replycontent-wrapper").show(); //答复内容
  389. $(".isstaisfied-wrapper").show(); //是否满意
  390. }
  391. } else if (isProResultdata === '2') {
  392. $(".prosituation-wrapper").show(); //处理方案/进程
  393. $(".annotation-wrapper").show(); //注释
  394. $(".connecttime-wrapper").hide(); //沟通时间
  395. $(".connectmode-wrapper").hide(); //沟通方式
  396. // $(".replycontent-wrapper").hide(); //答复内容
  397. $(".isstaisfied-wrapper").hide(); //是否满意
  398. }
  399. }
  400. //简易版工单详情
  401. function simpleDetail() {
  402. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkorderSimp', {
  403. workorderid: wid,
  404. token: $.cookie("token")
  405. }, function (result) {
  406. if (result.state.toLowerCase() == "success") {
  407. var data = result.data[0];
  408. simpleDetailStrStart = data.F_CreateTime + " " + data.deptname + "部门接到" + data.SourceName + "来源工单(编号:" + data.F_WorkOrderId + ")反映" + data.F_ComTitle + "问题,"
  409. }
  410. })
  411. }
  412. </script>
  413. </body>
  414. </html>