Няма описание

XGwordel.html 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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 type="text/css">
  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="wrapper wrapper-content animated fadeInRight">
  27. <div style="padding: 10px;" class="tj_content clearFix">
  28. <div class="Common">
  29. <table>
  30. <tr>
  31. <th class="">姓名:</th>
  32. <td>
  33. <input type="text" id="cusname" />
  34. </td>
  35. <th>性别:</th>
  36. <td>
  37. <select class="select_" id="SEX">
  38. <option value="">请选择</option>
  39. <option value="0">男</option>
  40. <option value="1">女</option>
  41. </select>
  42. </td>
  43. <th>来源:</th>
  44. <td>
  45. <select class="select_" id="source">
  46. </select>
  47. </td>
  48. <th class="Importent">来电号码:</th>
  49. <td>
  50. <input type="text" id="cusphone" />
  51. </td>
  52. </tr>
  53. <!-- <tr>
  54. <th>邮箱:</th>
  55. <td>
  56. <input type="text" id="email" />
  57. </td>
  58. <th>邮编:</th>
  59. <td>
  60. <input type="text" id="zipcode" />
  61. </td>
  62. <th>联系电话:</th>
  63. <td>
  64. <input type="text" id="conphone" />
  65. </td>
  66. </tr> -->
  67. <tr>
  68. <th class="Importent">标题:</th>
  69. <td colspan="7">
  70. <input id="title" type="text" style="width: 100%;" />
  71. </td>
  72. </tr>
  73. <tr>
  74. <th class="Importent">内容:</th>
  75. <td colspan="7">
  76. <textarea data-adaptheight id="content" name="" rows="" cols="" style="width: 100%;"></textarea>
  77. </td>
  78. </tr>
  79. <tr>
  80. <th class="Importent">事件地址:</th>
  81. <td colspan="7">
  82. <select class="select_" id="sourcearea">
  83. </select>
  84. <input id="sourceaddress" type="text" placeholder="输入详细地址" style="width:66%" />
  85. </td>
  86. </tr>
  87. <tr>
  88. <th class="Importent"></th>
  89. <td colspan="7">
  90. <input id="sourceaddress" type="text" placeholder="输入详细地址" style="width:50%; padding-left: 15px;" />
  91. </td>
  92. </tr>
  93. <tr>
  94. <th class="Importent"></th>
  95. <td colspan="7">
  96. <div style="width:710px">
  97. <div id="myMap" style="width:100%;height:400px;"></div>
  98. <input type="hidden" class="store_Lng" value="115.659773"/>
  99. <input type="hidden" class="store_Lat" value="34.395449"/>
  100. </div>
  101. </td>
  102. </tr>
  103. <tr>
  104. <th>附件上传:</th>
  105. <td colspan="7">
  106. <div class="fileBox">
  107. </div>
  108. <!--<input type="text" placeholder="输入附件详情" style="width:66%" />-->
  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. <tr class="Nows_box Hidens">
  120. <th>办理内容:</th>
  121. <td colspan="7">
  122. <input type="text" style="width: 100%;" id="result" />
  123. </td>
  124. </tr>
  125. <tr>
  126. <th class="Importent">主题词:</th>
  127. <td>
  128. <!--<input id="keys" type="text" placeholder="输入主题词" style="width:100%" />-->
  129. <select class="select_" id="keys">
  130. <option value=""></option>
  131. </select>
  132. </td>
  133. <th>类型:</th>
  134. <td>
  135. <select class="select_" id="type">
  136. </select>
  137. </td>
  138. <th>密级:</th>
  139. <td>
  140. <input type="radio" name="mj" id="" value="0" />普通
  141. <input type="radio" name="mj" id="" value="1" />保密
  142. </td>
  143. <th class="Importent">紧急程度:</th>
  144. <td>
  145. <select class="select_" id="level">
  146. <!--<option value="0">选择</option>-->
  147. <option value="1">普通</option>
  148. <option value="2">紧急</option>
  149. </select>
  150. </td>
  151. <!--<th class="">分管领导:</th>
  152. <td colspan="4">
  153. <input id="splituser" type="text" placeholder="" style="width:100%" readonly="readonly" />
  154. </td>-->
  155. </tr>
  156. </table>
  157. <div class="btn_box">
  158. <button class="btns BC">保存</button>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. <script src="https://api.map.baidu.com/api?v=2.0&ak=ZG4gLQZUD6Eq1K11cqlYAR4by8CKgLyu&callback=mapinit"></script>
  164. <script src="../css/laydate/laydate.js"></script>
  165. <script src="../js/adjustHeight.js"></script>
  166. <script src="../js/appeal/mapIndex.js"></script>
  167. <script src="../Script/Common/huayi.common.js"></script>
  168. <script>
  169. var wid = helper.request.queryString("wid");
  170. var submit;
  171. $(document).ready(function() {
  172. QY($("#sourcearea"));
  173. LY($("#source"));
  174. LB($("#type"));
  175. ZT($("#keys"))
  176. //当即办理
  177. $(".Nows").click(function() {
  178. $(".Nows_box").toggle();
  179. })
  180. $(".Nows_").click(function() {
  181. $(".Nows_box").toggle();
  182. })
  183. $(".BC").click(function() {
  184. Add()
  185. });
  186. //上传附件
  187. $("#scwj").click(function() {
  188. $("#upFile").trigger("click");
  189. })
  190. $("#upFile").change(function() {
  191. upload('upFile','.fileBox',['png','jpg','mp3','mp4','pdf','doc','docx','xls','xlsx'],"#file");
  192. })
  193. // $("#scfj").click(function() {
  194. // $(".fjnr").text("");
  195. // $("#scfj").hide();
  196. // })
  197. // $(".SavedSubmit").click(function() {
  198. // submit = 1;
  199. // Add()
  200. // })
  201. if (wid) {
  202. $.ajax({
  203. type: "get",
  204. url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrder",
  205. dataType: 'json',
  206. async: false,
  207. data: {
  208. workorderid: wid,
  209. token: $.cookie("token")
  210. },
  211. success: function (data) {
  212. if (data.state.toLowerCase() == "success") {
  213. var Data = data.data.data;
  214. $("#cusname").val(Data[0].F_CusName);
  215. $("#cusphone").val(Data[0].F_CusPhone);
  216. $("#conphone").val(Data[0].F_ConPhone);
  217. $("#title").val(Data[0].F_ComTitle);
  218. $('#content').val(Data[0].F_ComContent);
  219. $('#email').val(Data[0].F_Email);
  220. $("#zipcode").val(Data[0].F_ZipCode);
  221. $("#result").val(Data[0].F_Result);
  222. if (Data[0].F_Longitude) {
  223. $(".store_Lng").val(Data[0].F_Longitude);
  224. $(".store_Lat").val(Data[0].F_Latitude);
  225. }
  226. //x性别
  227. $("#SEX option:selected").val(Data[0].F_CusSex + '');
  228. if (Data[0].F_CusSex=="0") {
  229. $("#SEX option:selected").text("男"); //乡镇
  230. } else{
  231. $("#SEX option:selected").text("女"); //乡镇
  232. }
  233. //来源
  234. $("#source option:selected").val(Data[0].F_InfoSource + '');
  235. $("#source option:selected").text(Data[0].SourceName); //来源
  236. //事件地址
  237. $("#sourcearea option:selected").val(Data[0].F_SourceArea + '');
  238. $("#sourcearea option:selected").text(Data[0].AreaName); //事件地址
  239. //主题词
  240. $("#keys option:selected").val(Data[0].F_Key + '');
  241. $("#keys option:selected").text(Data[0].KeyName); //主题词
  242. //类型
  243. $("#type option:selected").val(Data[0].F_InfoType + '');
  244. $("#type option:selected").text(Data[0].TypeName1); //类型
  245. //紧急程度
  246. $("#level").val(Data[0].F_Level + '');
  247. if (Data[0].F_Level=="1") {
  248. $("#level option:selected").text("普通"); //乡镇
  249. } else{
  250. $("#level option:selected").text("紧急"); //乡镇
  251. }
  252. if (Data[0].F_IsResult == 1) {
  253. $(".Nows_box").toggle();
  254. }
  255. $(' input[name="mj"][value="' + Data[0].F_IsProtect + '"]').prop("checked", "checked");
  256. $(' input[name="banli"][value="' + Data[0].F_IsResult + '"]').prop("checked", "checked");
  257. $('#sourceaddress').val(Data[0].F_SourceAddress);
  258. $('.F_FinalOpinion').val(Data[0].F_FinalOpinion);
  259. $(Data[0].File).each(function (k, q) {
  260. var strs = '<span class="files" fiel-num="' + q.F_FileId + '">' + q.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
  261. $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
  262. event.stopPropagation();
  263. $(this).parent().remove();
  264. file_num()
  265. })
  266. file_num()
  267. })
  268. }
  269. }
  270. });
  271. }
  272. });
  273. ///修改工单
  274. function Add() {
  275. var value = $(' input[name="banli"]:checked ').val();
  276. var content = $("#content").val();
  277. // if (!$("#cusname").val()) {
  278. // layer.msg("请输入姓名");
  279. // } else
  280. if (!$("#cusphone").val()) {
  281. layer.msg("请输入来电号码");
  282. } else if (!$("#title").val()) {
  283. layer.msg("请输入标题");
  284. } else if (!$("#content").val()) {
  285. layer.msg("请输入内容");
  286. } else if (!$("#keys").val()) {
  287. layer.msg("请选择主题词");
  288. // } else if (!$("#sourcearea").val()) {
  289. // layer.msg("请选择事发区域");
  290. } else {
  291. $.ajax({
  292. type: "post",
  293. url: huayi.config.callcenter_url + "WorkOrder/EditWorkOrderByAdmin",
  294. dataType: 'json',
  295. async: true,
  296. data: {
  297. workorderid: wid,
  298. cusname: $("#cusname").val(), //=来电人姓名
  299. cussex: $("#SEX").val(),
  300. cusphone: $("#cusphone").val(), //=来电人电话
  301. email: $("#email").val(),
  302. zipcode: $("#zipcode").val(),
  303. conphone: $("#conphone").val(),
  304. title: $("#title").val(),
  305. content: $("#content").val(),
  306. files: $("#file").val(), //(多个用英文逗号,隔开)
  307. sourcearea: $("#sourcearea").val(), //=事发地域id
  308. sourceaddress: $('#sourceaddress').val(), //=事发详细地址
  309. source: $("#source").val(), //=来源
  310. result: $('#result').val(),
  311. keys: $("#keys").val(), //=关键词id(多个用英文逗号,隔开)
  312. type: $("#type").val(), //=类型
  313. bigtype: $("#bigtype").val(), //=大类别
  314. smalltype: $("#smalltype").val(), //=小类别
  315. isprotect: $(' input[name="mj"]:checked ').val(), //=(0普通1保密)
  316. level: $('#level').val(), //=(1普通2紧急)
  317. token: $.cookie("token")
  318. },
  319. success: function(data) {
  320. if(data.state.toLowerCase() == "success") {
  321. $('.fileBox').html('');
  322. parent.parent.layer.closeAll();
  323. parent.parent.$('#orderlist').bootstrapTable('refresh');
  324. parent.parent.layer.msg("操作成功!");
  325. }
  326. }
  327. });
  328. }
  329. }
  330. //来源
  331. function LY(obj) {
  332. obj.empty();
  333. obj.append('<option selected="selected" value="">请选择</option>');
  334. $.ajax({
  335. type:"get",
  336. url:huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
  337. dataType:"json",
  338. async:false,
  339. data:{
  340. "token": $.cookie("token"),
  341. id: 1
  342. },
  343. success:function(data){
  344. if (data.state.toLowerCase() == "success") {
  345. var content = data.data;
  346. $(content).each(function (i, n) {
  347. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  348. })
  349. }
  350. }
  351. });
  352. }
  353. //类别
  354. function LB(obj) {
  355. obj.empty();
  356. obj.append('<option selected="selected" value="">请选择</option>');
  357. $.ajax({
  358. type:"get",
  359. url:huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
  360. dataType:"json",
  361. async:false,
  362. data:{
  363. "token": $.cookie("token"),
  364. id: 2
  365. },
  366. success:function(data){
  367. if (data.state.toLowerCase() == "success") {
  368. var content = data.data;
  369. $(content).each(function (i, n) {
  370. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  371. })
  372. }
  373. }
  374. });
  375. }
  376. // 主题
  377. function ZT(obj) {
  378. obj.empty();
  379. obj.append('<option selected="selected" value="">请选择</option>');
  380. $.ajax({
  381. type:"get",
  382. url:huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
  383. dataType:"json",
  384. async:false,
  385. data:{
  386. "token": $.cookie("token"),
  387. id: 3
  388. },
  389. success:function(data){
  390. if (data.state.toLowerCase() == "success") {
  391. var content = data.data;
  392. $(content).each(function (i, n) {
  393. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  394. })
  395. }
  396. }
  397. });
  398. }
  399. //区域
  400. function QY(obj) {
  401. obj.empty();
  402. obj.append('<option selected="selected" value="">请选择</option>');
  403. $.ajax({
  404. type:"get",
  405. url:huayi.config.callcenter_url + "Area/GetAreaListById",
  406. dataType:"json",
  407. async:false,
  408. data:{
  409. "token": $.cookie("token"),
  410. },
  411. success:function(data){
  412. if (data.state.toLowerCase() == "success") {
  413. var content = data.data;
  414. $(content).each(function (i, n) {
  415. if (n.F_AreaName != '安阳市') {
  416. $("<option value='" + n.F_AreaId + "'>" + n.F_AreaName + "</option>").appendTo(obj);
  417. }
  418. })
  419. }
  420. }
  421. });
  422. }
  423. //上传文件
  424. // function upload() {
  425. // var Files = document.getElementById("upFile").files;
  426. // if(Files.length > 0) {
  427. // var formData = new FormData();
  428. // for(var i = 0; i < Files.length; i++) {
  429. // formData.append('file' + i, Files[i]);
  430. // }
  431. // formData.append("token", $.cookie("token"));
  432. // var typeName=Files[0].name.split('.')[1];
  433. // if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
  434. // $.ajax({
  435. // url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  436. // type: "POST",
  437. // data: formData,
  438. // /**
  439. // *必须false才会自动加上正确的Content-Type
  440. // */
  441. // contentType: false,
  442. // /**
  443. // * 必须false才会避开jQuery对 formdata 的默认处理
  444. // * XMLHttpRequest会对 formdata 进行正确的处理
  445. // */
  446. // processData: false,
  447. // success: function(result) {
  448. // document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  449. // $("#upFile").change(function() {
  450. // upload();
  451. // });
  452. // var r = $.parseJSON(result);
  453. // if(r.state.toLowerCase() == "success") {
  454. // var a = r.data;
  455. // $(a).each(function(i, n) {
  456. // var strs='<span class="files" fiel-num="'+ n.F_FileId +'">'+ n.F_FileName.substring(19) +'<i class="fa fa-remove del_file"></i></span>'
  457. // $(strs).appendTo($('.fileBox')).find('.del_file').click(function(event){
  458. // event.stopPropagation();
  459. // $(this).parent().remove();
  460. // file_num();
  461. // })
  462. // })
  463. // file_num();
  464. // }
  465. // }
  466. // });
  467. // }else{
  468. // layer.msg("格式不正确");
  469. // }
  470. // } else {
  471. // layer.confirm('请上传文件!', {
  472. // btn: ['确定']
  473. // });
  474. // }
  475. // }
  476. // //上传文件隐藏域值
  477. // function file_num(){
  478. // var str = '';
  479. // var Str;
  480. // $('.fileBox .files').each(function(j,m){
  481. // var aa=$(m).attr("fiel-num")
  482. // console.log(aa);
  483. // str += aa + ",";
  484. // Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  485. // })
  486. // $("#file").val(Str);
  487. // }
  488. </script>
  489. </body>
  490. </html>