Keine Beschreibung

changeComprehensiveScoresGongYi.html 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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. </head>
  11. <body>
  12. <div class="Common">
  13. <table>
  14. <!--onkeyup="value=value.replace(/[^\d-]/g,'')"-->
  15. <tr>
  16. <th>分数:</th>
  17. <td>
  18. <input type="text" id="score" />
  19. </td>
  20. </tr>
  21. <tr>
  22. <th class="">备注:</th>
  23. <td colspan="7"><textarea data-adaptheight id="remark" name="" rows="4" cols=""></textarea></td>
  24. </tr>
  25. </table>
  26. <div class="btn_box">
  27. <button class="btns BC">保存</button>
  28. </div>
  29. </div>
  30. <script src="../js/adjustHeight.js"></script>
  31. <script>
  32. var id = helper.request.queryString("id");
  33. var state = helper.request.queryString("state");
  34. var type = helper.request.queryString("type");
  35. var dateT = helper.request.queryString("dateT");
  36. $(document).ready(function () {
  37. $('.BC').click(function () {
  38. if(state == 0){
  39. BX()
  40. }else if(state == 1){
  41. JD()
  42. }else{
  43. JA();
  44. }
  45. })
  46. });
  47. function JA() {
  48. $.post(huayi.config.callcenter_url + 'Department/UpdateComprehensive', {
  49. id: id,
  50. Comprehensive: $("#score").val(),
  51. Remarks: $("#remark").val(), //回访内容
  52. token: $.cookie("token")
  53. }, function (result) {
  54. result = JSON.parse(result);
  55. if (result.state.toLowerCase() == "success") {
  56. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  57. console.log(index);
  58. parent.layer.close(index); //再执行关闭
  59. parent.initTable();
  60. parent.layer.msg("操作成功");
  61. }
  62. })
  63. }
  64. function BX(){
  65. // var nowDate = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) +'-' + new Date().getDate()
  66. if(Number($('#score').val())>5&& type =='0'){
  67. layer.msg("信息宣传最高分值为5分", {
  68. time: 1500,
  69. icon: 2
  70. });
  71. return
  72. }
  73. if(Number($('#score').val())>10&& type =='1'){
  74. layer.msg("优秀案件最高分值为10分", {
  75. time: 1500,
  76. icon: 2
  77. });
  78. return
  79. }
  80. if(Number($('#score').val())>5&& type =='2'){
  81. layer.msg("即办事项最高分值为5分", {
  82. time: 1500,
  83. icon: 2
  84. });
  85. return
  86. }
  87. $.post(huayi.config.callcenter_url + 'Department/Evaluation', {
  88. deptid: id,
  89. type:type,
  90. ScoreTime: dateT,
  91. Score: $("#score").val(),
  92. Remarks: $("#remark").val(), //回访内容
  93. token: $.cookie("token")
  94. }, function (result) {
  95. result = JSON.parse(result);
  96. if (result.state.toLowerCase() == "success") {
  97. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  98. parent.layer.close(index); //再执行关闭
  99. parent.initTable();
  100. parent.layer.msg("操作成功");
  101. }
  102. })
  103. }
  104. function JD(){
  105. var nowDate = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) +'-' + new Date().getDate()
  106. if(Number($('#score').val())>0){
  107. layer.msg("此为减分项", {
  108. time: 1500,
  109. icon: 2
  110. });
  111. return
  112. }
  113. $.post(huayi.config.callcenter_url + 'Department/Supervision', {
  114. deptid: id,
  115. ScoreTime: dateT,
  116. Score: Number($("#score").val()),
  117. Remarks: $("#remark").val(), //回访内容
  118. token: $.cookie("token")
  119. }, function (result) {
  120. result = JSON.parse(result);
  121. if (result.state.toLowerCase() == "success") {
  122. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  123. parent.layer.close(index); //再执行关闭
  124. parent.initTable();
  125. parent.layer.msg("操作成功");
  126. }
  127. })
  128. }
  129. </script>
  130. </body>
  131. </html>