新野县12345_前端

AddAppeal.html 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  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 rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  8. <link href="../css/layer/need/layer.css" />
  9. <link rel="stylesheet" href="../css/init.css" />
  10. <title>新增诉求工单</title>
  11. <style>
  12. .input {
  13. background-color: #FFF;
  14. background-image: none;
  15. border: 1px solid #ccc;
  16. border-radius: 1px;
  17. color: inherit;
  18. padding: 6px 12px
  19. }
  20. .fjnr {
  21. padding: 0!important;
  22. border: none!important;
  23. }
  24. .radio-inline input[type=radio]{
  25. margin-top: 5px;
  26. }
  27. .Common{
  28. background: #f3f3f4;
  29. }
  30. .inpBox {
  31. border: 1px solid #e5e6e7;
  32. height: 34px;
  33. width: 220px;
  34. display: inline-block;
  35. position: relative;
  36. vertical-align: middle;
  37. }
  38. .addTree {
  39. background: #fff;
  40. position: absolute;
  41. width: 100%;
  42. border: 1px solid #e5e6e7;
  43. right: 0;
  44. top: 33px;
  45. display: none;
  46. z-index: 222;
  47. }
  48. .xl5 {
  49. display: inline-block;
  50. background: url(../../img/dropDown.png) no-repeat;
  51. height: 100%;
  52. background-position: center center;
  53. width: 20px;
  54. position: absolute;
  55. right: 0;
  56. top: 0px;
  57. /* background-color: #f7bc8b; */
  58. cursor: pointer;
  59. }
  60. .ztree li span {
  61. border: none;
  62. padding: 0;
  63. }
  64. .inps5 {
  65. width: 217px;
  66. height: 32px;
  67. outline: none;
  68. border: 0;
  69. border-image-width: 0;
  70. padding: 0;
  71. padding-left: 3px;
  72. }
  73. .xl5 {
  74. display: inline-block;
  75. background: url(../img/dropDown.png) no-repeat;
  76. height: 100%;
  77. background-position: center center;
  78. width: 20px;
  79. position: absolute;
  80. right: 0;
  81. top: 0px;
  82. /* background-color: #f7bc8b; */
  83. cursor: pointer;
  84. }
  85. .Cleans5{
  86. display: inline-block;
  87. width: 20px;
  88. position: absolute;
  89. right: 21px;
  90. top: 9px;
  91. display: none;
  92. }
  93. .wrapper{
  94. height: 100%;
  95. }
  96. .tj_content{
  97. height: 100%;
  98. }
  99. .Common{
  100. height: 100%;
  101. }
  102. </style>
  103. </head>
  104. <body class="gray-bg">
  105. <div class="daoHang clearfix">
  106. <div class="dhLeft">
  107. <sapn>
  108. <i class="syIcon"></i>位置:
  109. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  110. <a href="javaScript:;">工单处理</a>&gt;
  111. <a class="nowPosition">添加工单</a>
  112. </sapn>
  113. </div>
  114. <div class="dhRight">
  115. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  116. </div>
  117. </div>
  118. <div class="wrapper wrapper-content">
  119. <div style="padding: 10px;" class="tj_content clearFix">
  120. <div class="Common">
  121. <table>
  122. <tr>
  123. <th>姓名:</th>
  124. <td>
  125. <input type="text" id="cusname" />
  126. </td>
  127. <th>性别:</th>
  128. <td>
  129. <select class="select_" id="cussex">
  130. <option value="">请选择</option>
  131. <option value="0">男</option>
  132. <option value="1">女</option>
  133. </select>
  134. </td>
  135. <th>来源:</th>
  136. <td>
  137. <div class="inpBox" style="width: 172px;">
  138. <input type="text" style="width: 170px;" class="inps3" placeholder="请选择来源" />
  139. <i class="Cleans3 fa fa-close"></i>
  140. <i class="xl3 xl_one"></i>
  141. <div class="addTree xlAdd3">
  142. <ul id="addTreeDemo3" class="ztree">
  143. </ul>
  144. </div>
  145. </div>
  146. <!--<select class="select_" id="source">
  147. </select>-->
  148. </td>
  149. <th>投诉电话:</th>
  150. <td>
  151. <input type="text" id="cusphone" />
  152. </td>
  153. </tr>
  154. <tr>
  155. <th>邮箱:</th>
  156. <td>
  157. <input type="text" id="email" />
  158. </td>
  159. <th>邮编:</th>
  160. <td>
  161. <input type="text" id="zipcode" />
  162. </td>
  163. <th>联系电话:</th>
  164. <td>
  165. <input type="text" id="conphone" />
  166. </td>
  167. <th class="Importent">主题词:</th>
  168. <td>
  169. <div class="inpBox" style="width: 132px;">
  170. <input type="text" style="width: 130px;" class="inps4" placeholder="请选择主题词" />
  171. <i class="Cleans4 fa fa-close"></i>
  172. <i class="xl4 xl_one"></i>
  173. <div class="addTree xlAdd4">
  174. <ul id="addTreeDemo4" class="ztree">
  175. </ul>
  176. </div>
  177. </div>
  178. <!--<input id="keys" type="text" placeholder="输入主题词" style="width:100%" />-->
  179. <!--<select class="select_" id="keys">
  180. <option value=""></option>
  181. </select>-->
  182. </td>
  183. </tr>
  184. <tr>
  185. <th>来源地址&nbsp;&nbsp;省:</th>
  186. <td style="position: relative;">
  187. <div class="form-group">
  188. <select class="form-control" id="province">
  189. <option value ="">请选择</option>
  190. </select>
  191. </div>
  192. </td>
  193. <th>市:</th>
  194. <td style="position: relative;">
  195. <div class="form-group">
  196. <select class="form-control" id="city">
  197. <option value ="">请选择</option>
  198. </select>
  199. </div>
  200. </td>
  201. <th>区/县:</th>
  202. <td style="position: relative;">
  203. <div class="form-group">
  204. <select class="form-control" id="county">
  205. <option value ="">请选择</option>
  206. </select>
  207. </div>
  208. </td>
  209. <th>乡:</th>
  210. <td style="position: relative;">
  211. <div class="form-group">
  212. <select class="form-control" id="village">
  213. <option value ="">请选择</option>
  214. </select>
  215. </div>
  216. </td>
  217. </tr>
  218. <tr>
  219. <th class="Importent">标题:</th>
  220. <td colspan="7">
  221. <input id="title" type="text" style="width: 100%;" />
  222. </td>
  223. </tr>
  224. <tr>
  225. <th class="Importent">内容:</th>
  226. <td colspan="7">
  227. <textarea data-adaptheight id="content" name="" rows="" cols="" style="width: 100%;"></textarea>
  228. </td>
  229. </tr>
  230. <tr>
  231. <th class="Importent">事件地址:</th>
  232. <td colspan="7">
  233. <select class="select_" id="sourcearea">
  234. </select>
  235. <input id="sourceaddress" type="text" placeholder="输入详细地址" style="width:66%" />
  236. </td>
  237. </tr>
  238. <tr>
  239. <th>附件上传:</th>
  240. <td colspan="7">
  241. <div class="fileBox">
  242. <!--<span class="files">文件1<i class="fa fa-remove"></i></span>-->
  243. </div>
  244. <!--<input type="text" placeholder="输入附件详情" style="width:66%" />-->
  245. <!--<span class="fjnr"></span>-->
  246. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  247. <input class="input" type="button" value="上传" id="scwj" />
  248. <input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />
  249. <input type="hidden" id="file" />
  250. </td>
  251. </tr>
  252. <tr>
  253. <th>处理方式:</th>
  254. <td colspan="7">
  255. <label class="radio-inline">
  256. <input type="radio" name="banli" value="1" class="Nows"> 当即办理
  257. </label>
  258. <label class="radio-inline">
  259. <input type="radio" name="banli" checked="true" value="0" class="Nows_"> 网络转办
  260. </label>
  261. </td>
  262. </tr>
  263. <tr class="Nows_box Hidens">
  264. <th>办理内容:</th>
  265. <td colspan="7">
  266. <input type="text" style="width: 100%;" id="result" />
  267. </td>
  268. </tr>
  269. <tr>
  270. <th>被投诉单位:</th>
  271. <td>
  272. <div class="inpBox">
  273. <input type="text" class="inps5" placeholder="请选择被投诉单位" />
  274. <i class="Cleans5 fa fa-close"></i>
  275. <i class="xl5 xl_one"></i>
  276. <div class="addTree xlAdd5">
  277. <ul id="addTreeDemo5" class="ztree">
  278. </ul>
  279. </div>
  280. </div>
  281. <!--<input id="keys" type="text" placeholder="输入主题词" style="width:100%" />-->
  282. <!--<select class="select_" id="keys">
  283. <option value=""></option>
  284. </select>-->
  285. </td>
  286. <th>类型:</th>
  287. <td>
  288. <div class="inpBox" style="width: 132px;">
  289. <input type="text" style="width: 130px;" class="inps2" placeholder="请选择类型" />
  290. <i class="Cleans2 fa fa-close"></i>
  291. <i class="xl2 xl_one"></i>
  292. <div class="addTree xlAdd2">
  293. <ul id="addTreeDemo2" class="ztree">
  294. </ul>
  295. </div>
  296. </div>
  297. <!--<select class="select_" id="type">
  298. </select>-->
  299. </td>
  300. <th>密级:</th>
  301. <td>
  302. <label class="radio-inline">
  303. <input type="radio" name="mj" checked="true" value="0"> 普通
  304. </label>
  305. <label class="radio-inline">
  306. <input type="radio" name="mj" checked="true" value="1"> 保密
  307. </label>
  308. </td>
  309. <th>紧急程度:</th>
  310. <td>
  311. <select class="select_" id="level">
  312. <option value="0">选择</option>
  313. <option value="1">普通</option>
  314. <option value="2">紧急</option>
  315. </select>
  316. </td>
  317. <!--<th class="">分管领导:</th>
  318. <td colspan="4">
  319. <input id="splituser" type="text" placeholder="" style="width:100%" readonly="readonly" />
  320. </td>-->
  321. </tr>
  322. </table>
  323. <div class="btn_box">
  324. <button class="btns BC">保存</button>
  325. <button class="btns SavedSubmit">保存并提交</button>
  326. </div>
  327. </div>
  328. </div>
  329. </div>
  330. <input type="hidden" id="complaint_unit" />
  331. <input type="hidden" id="type_id" />
  332. <input type="hidden" id="source_id" />
  333. <input type="hidden" id="source_address_id" />
  334. <input type="hidden" id="theme_word_id" />
  335. <script src="../css/laydate/laydate.js"></script>
  336. <script src="../js/adjustHeight.js"></script>
  337. <script src="../My97DatePicker/WdatePicker.js"></script>
  338. <script src="../js/zTree/jquery.ztree.core.js"></script>
  339. <script src="../js/pull_down.js"></script>
  340. <script>
  341. var submit;
  342. $(document).ready(function() {
  343. QY($("#sourcearea"));
  344. LY($("#source"));
  345. LB($("#type"));
  346. ZT($("#keys"))
  347. LAISHENG($("#province"));//省
  348. //省
  349. function LAISHENG(obj) {
  350. obj.empty();
  351. obj.append('<option selected="selected" value="">请选择</option>');
  352. $.getJSON(huayi.config.callcenter_url + "AddressManage/GetAddressList", {
  353. "token": $.cookie("token"),
  354. parentcode:'',
  355. }, function (data) {
  356. if (data.state.toLowerCase() == "success") {
  357. var content = data.data;
  358. $(content).each(function (i, n) {
  359. $("<option value='" + n.Code + "'>" + n.Name + "</option>").appendTo(obj);
  360. })
  361. }
  362. })
  363. }
  364. //市
  365. function LAISHI(obj) {
  366. obj.empty();
  367. obj.append('<option selected="selected" value="">请选择</option>');
  368. if($('#province').val()){
  369. $.getJSON(huayi.config.callcenter_url + "AddressManage/GetAddressList", {
  370. "token": $.cookie("token"),
  371. parentcode: $('#province').val(),
  372. }, function (data) {
  373. if (data.state.toLowerCase() == "success") {
  374. var content = data.data;
  375. $(content).each(function (i, n) {
  376. $("<option value='" + n.Code + "'>" + n.Name + "</option>").appendTo(obj);
  377. })
  378. }
  379. })
  380. }
  381. }
  382. //区/县
  383. function LAIQU(obj) {
  384. obj.empty();
  385. obj.append('<option selected="selected" value="">请选择</option>');
  386. if($('#city').val()){
  387. $.getJSON(huayi.config.callcenter_url + "AddressManage/GetAddressList", {
  388. "token": $.cookie("token"),
  389. parentcode: $('#city').val(),
  390. }, function (data) {
  391. if (data.state.toLowerCase() == "success") {
  392. var content = data.data;
  393. $(content).each(function (i, n) {
  394. $("<option value='" + n.Code + "'>" + n.Name + "</option>").appendTo(obj);
  395. })
  396. }
  397. })
  398. }
  399. }
  400. //乡镇
  401. function VILLAGE(obj) {
  402. obj.empty();
  403. obj.append('<option selected="selected" value="">请选择</option>');
  404. if($('#county').val()){
  405. $.getJSON(huayi.config.callcenter_url + "AddressManage/GetAddressList", {
  406. "token": $.cookie("token"),
  407. parentcode: $('#county').val(),
  408. }, function (data) {
  409. if (data.state.toLowerCase() == "success") {
  410. var content = data.data;
  411. $(content).each(function (i, n) {
  412. $("<option value='" + n.Code + "'>" + n.Name + "</option>").appendTo(obj);
  413. })
  414. }
  415. })
  416. }
  417. }
  418. $('#province').on('change',function(){
  419. LAISHI($("#city"));
  420. });
  421. $('#city').on('change',function(){
  422. LAIQU($("#county"));
  423. });
  424. $('#county').on('change',function(){
  425. VILLAGE($("#village"));
  426. });
  427. //当即办理
  428. $(' input[name="banli"]').change(function(){
  429. var val=$(this).val();
  430. if(val=="1"){
  431. $(".Nows_box").show();
  432. }else{
  433. $(".Nows_box").hide();
  434. }
  435. })
  436. $(".BC").click(function() {
  437. submit = 0;
  438. Add();
  439. })
  440. $('.SavedSubmit').click(function() {
  441. submit = 1;
  442. Add();
  443. })
  444. tree();
  445. //被投诉单位下拉
  446. $('.inps5').click(function() {
  447. $('.xlAdd5').css('display', 'block')
  448. })
  449. $('.xl5').click(function() {
  450. if($('.xlAdd5').css('display') == 'block') {
  451. $('.xlAdd5').css('display', 'none')
  452. } else {
  453. $('.xlAdd5').css('display', 'block')
  454. }
  455. })
  456. $('.addTree').mouseleave(function() {
  457. $(this).css('display', 'none')
  458. })
  459. //清除
  460. $(".Cleans5 ").click(function(){
  461. $('.inps5').val("");
  462. $("#complaint_unit").val("");
  463. })
  464. //上传附件
  465. $("#scwj").click(function() {
  466. $("#upFile").trigger("click");
  467. })
  468. $("#upFile").change(function() {
  469. upload();
  470. })
  471. $("#scfj").click(function() {
  472. // $(".fjnr").text("");
  473. // $("#scfj").hide();
  474. })
  475. });
  476. //添加工单
  477. function Add() {
  478. var value = $(' input[name="banli"]:checked ').val();
  479. var content = $("#content").val();
  480. if (!$("#title").val()) {
  481. layer.msg("请输入标题");
  482. } else if (!$("#content").val()) {
  483. layer.msg("请输入内容");
  484. } else if (!$("#theme_word_id").val()) {
  485. layer.msg("请选择主题词");
  486. } else if (!$("#sourcearea").val()) {
  487. layer.msg("请选择事发区域");
  488. } else if (value == 1 && !$('#result').val()) {
  489. layer.msg("请输入直办内容");
  490. } else {
  491. $.ajax({
  492. type: "post",
  493. url: huayi.config.callcenter_url + "/WorkOrder/AddWorkOrder",
  494. dataType: 'json',
  495. async: true,
  496. data: {
  497. cusname: $("#cusname").val(), //=投诉人姓名
  498. cussex: $("#cussex").val(),
  499. cusphone: $("#cusphone").val(), //=投诉人电话
  500. email: $("#email").val(),
  501. zipcode: $("#zipcode").val(),
  502. conphone: $("#conphone").val(),
  503. title: $("#title").val(),
  504. content: $("#content").val(),
  505. files: $("#file").val(), //(多个用英文逗号,隔开)
  506. sourcearea: $("#sourcearea").val(), //=事发地域id
  507. sourceaddress: $('#sourceaddress').val(), //=事发详细地址
  508. source: $("#source_id").val(), //=来源
  509. isresult: $(' input[name="banli"]:checked ').val(), //=(0转办1直办)
  510. result: $('#result').val(),
  511. keys: $("#theme_word_id").val(), //=关键词id(多个用英文逗号,隔开)
  512. type: $("#type_id").val(), //=类型
  513. isprotect: $(' input[name="mj"]:checked ').val(), //=(0普通1保密)
  514. level: $('#level').val(), //=(1普通2紧急)
  515. issubmit: submit, //=(0保存1保存并提交)
  516. complainedunitid:$('#complaint_unit').val(),//被投诉单位id
  517. addresscodes:detailedAddress(),//地址
  518. token: $.cookie("token")
  519. },
  520. success: function(data) {
  521. Clean();
  522. $('.fileBox').html('');
  523. layer.msg("创建工单成功");
  524. }
  525. });
  526. }
  527. }
  528. //上传文件
  529. function upload() {
  530. var Files = document.getElementById("upFile").files;
  531. if(Files.length > 0) {
  532. var formData = new FormData();
  533. for(var i = 0; i < Files.length; i++) {
  534. formData.append('file' + i, Files[i]);
  535. }
  536. formData.append("token", $.cookie("token"));
  537. $.ajax({
  538. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  539. type: "POST",
  540. data: formData,
  541. /**
  542. *必须false才会自动加上正确的Content-Type
  543. */
  544. contentType: false,
  545. /**
  546. * 必须false才会避开jQuery对 formdata 的默认处理
  547. * XMLHttpRequest会对 formdata 进行正确的处理
  548. */
  549. processData: false,
  550. success: function(result) {
  551. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  552. $("#upFile").change(function() {
  553. upload();
  554. });
  555. var r = $.parseJSON(result);
  556. if(r.state.toLowerCase() == "success") {
  557. // $(".fjnr").text(r.data[0].F_FileName.substring(19));
  558. var a = r.data;
  559. $(a).each(function(i, n) {
  560. var strs='<span class="files" fiel-num="'+ n.F_FileId +'">'+ n.F_FileName.substring(19) +'<i class="fa fa-remove del_file"></i></span>'
  561. $(strs).appendTo($('.fileBox')).find('.del_file').click(function(event){
  562. event.stopPropagation();
  563. $(this).parent().remove();
  564. file_num()
  565. })
  566. })
  567. file_num()
  568. }
  569. }
  570. });
  571. } else {
  572. layer.confirm('请上传文件!', {
  573. btn: ['确定']
  574. });
  575. }
  576. }
  577. //上传文件隐藏域值
  578. function file_num(){
  579. var str = '';
  580. var Str;
  581. $('.fileBox .files').each(function(j,m){
  582. var aa=$(m).attr("fiel-num")
  583. console.log(aa);
  584. str += aa + ",";
  585. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  586. })
  587. $("#file").val(Str);
  588. }
  589. //来源
  590. function LY(obj) {
  591. obj.empty();
  592. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  593. "token": $.cookie("token"),
  594. id: 1
  595. }, function(data) {
  596. if(data.state.toLowerCase() == "success") {
  597. var content = data.data;
  598. $(content).each(function(i, n) {
  599. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  600. })
  601. }
  602. })
  603. }
  604. //类别
  605. function LB(obj) {
  606. obj.empty();
  607. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  608. "token": $.cookie("token"),
  609. id: 2
  610. }, function(data) {
  611. if(data.state.toLowerCase() == "success") {
  612. var content = data.data;
  613. $(content).each(function(i, n) {
  614. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  615. })
  616. }
  617. })
  618. }
  619. // 主题
  620. function ZT(obj) {
  621. obj.empty();
  622. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  623. "token": $.cookie("token"),
  624. id: 3
  625. }, function(data) {
  626. if(data.state.toLowerCase() == "success") {
  627. var content = data.data;
  628. $(content).each(function(i, n) {
  629. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(obj);
  630. })
  631. }
  632. })
  633. }
  634. //区域
  635. function QY(obj) {
  636. obj.empty();
  637. obj.append('<option selected="selected" value="">请选择</option>');
  638. $.getJSON(huayi.config.callcenter_url + "Area/GetAreaListById", {
  639. "token": $.cookie("token"),
  640. }, function(data) {
  641. if(data.state.toLowerCase() == "success") {
  642. var content = data.data;
  643. $(content).each(function(i, n) {
  644. $("<option value='" + n.F_AreaId + "'>" + n.F_AreaName + "</option>").appendTo(obj);
  645. })
  646. }
  647. })
  648. }
  649. //被投诉单位
  650. function tree() {
  651. $.get(huayi.config.callcenter_url + 'Department/GetSecondDeptList', {
  652. "token": $.cookie("token"),
  653. "iscbdw": 1
  654. }, function(result) {
  655. result = $.parseJSON(result);
  656. $.fn.zTree.init($("#addTreeDemo5"), setting1, result.data); //实例化树形图
  657. });
  658. }
  659. var setting1 = {
  660. data: {
  661. key: {
  662. name: "F_DeptName"
  663. },
  664. simpleData: {
  665. enable: true,
  666. idKey: "F_DeptId",
  667. pIdKey: "F_PartentId",
  668. rootPId: 0
  669. }
  670. },
  671. callback: {
  672. onClick: zTreeOnClick
  673. }
  674. };
  675. function zTreeOnClick(event, treeId, treeNode) {
  676. if(treeNode.level == 2) {
  677. $('.inps5').val(treeNode.F_DeptName);
  678. $("#complaint_unit").val(treeNode.F_DeptId);
  679. $(".Cleans5").show();
  680. }
  681. };
  682. function Clean() {
  683. $("#cusname").val(''); //=投诉人姓名
  684. $("#cussex").val('');
  685. $("#cusphone").val(''); //=投诉人电话
  686. $("#email").val('');
  687. $("#zipcode").val('');
  688. $("#conphone").val('');
  689. $("#title").val('');
  690. $("#content").val('');
  691. $("#sourcearea").val(); //=事发地域id
  692. $('#sourceaddress').val(''); //=事发详细地址
  693. $("input[name='baomi'][value='1']").prop("checked", true) //=(0转办1直办)
  694. $("#type option:first").prop("selected", 'selected');
  695. $("#level option:first").prop("selected", 'selected');
  696. $("#keys option:first").prop("selected", 'selected');
  697. $("#sourcearea option:first").prop("selected", 'selected');
  698. $('#result').val('');
  699. $('.inps5').val("");
  700. $("#complaint_unit").val("");
  701. $('.inps2').val("");
  702. $("#type_id").val("");
  703. $('.inps3').val("");
  704. $("#source_id").val("");
  705. $('.inps4').val("");
  706. $("#theme_word_id").val("");
  707. $('#province').val('');
  708. $('#city').val('');
  709. $('#county').val('');
  710. $('#village').val('');
  711. }
  712. // 地址(省+市+区/县)
  713. function detailedAddress() {
  714. if($('#province').val() === ""){
  715. var province = '';
  716. } else {
  717. var province = $('#province').val()
  718. }
  719. if($('#city').val() === ""){
  720. var city = '';
  721. } else {
  722. var city = $('#city').val()
  723. }
  724. if($('#county').val() === ""){
  725. var county = '';
  726. } else {
  727. var county = $('#county').val()
  728. }
  729. if($('#village').val() === ""){
  730. var village = '';
  731. } else {
  732. var village = $('#village').val()
  733. }
  734. var address = province + '|' + city + '|' + county+ '|' + village;
  735. return address;
  736. }
  737. </script>
  738. </body>
  739. </html>