| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/layer/need/layer.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <title>综合考评分数</title>
- </head>
- <body>
- <div class="Common">
- <table>
- <!--onkeyup="value=value.replace(/[^\d-]/g,'')"-->
- <tr>
- <th>分数:</th>
- <td>
- <input type="text" id="score" />
- </td>
- </tr>
- <tr>
- <th class="">备注:</th>
- <td colspan="7"><textarea data-adaptheight id="remark" name="" rows="4" cols=""></textarea></td>
- </tr>
- </table>
- <div class="btn_box">
- <button class="btns BC">保存</button>
- </div>
- </div>
- <script src="../js/adjustHeight.js"></script>
- <script>
- var id = helper.request.queryString("id");
- var state = helper.request.queryString("state");
- var type = helper.request.queryString("type");
- var dateT = helper.request.queryString("dateT");
- $(document).ready(function () {
- $('.BC').click(function () {
- if(state == 0){
- BX()
- }else if(state == 1){
- JD()
- }else{
- JA();
- }
- })
- });
- function JA() {
- $.post(huayi.config.callcenter_url + 'Department/UpdateComprehensive', {
- id: id,
- Comprehensive: $("#score").val(),
- Remarks: $("#remark").val(), //回访内容
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- console.log(index);
- parent.layer.close(index); //再执行关闭
- parent.initTable();
- parent.layer.msg("操作成功");
- }
- })
- }
- function BX(){
- // var nowDate = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) +'-' + new Date().getDate()
- if(Number($('#score').val())>5&& type =='0'){
- layer.msg("信息宣传最高分值为5分", {
- time: 1500,
- icon: 2
- });
- return
- }
- if(Number($('#score').val())>10&& type =='1'){
- layer.msg("优秀案件最高分值为10分", {
- time: 1500,
- icon: 2
- });
- return
- }
- if(Number($('#score').val())>5&& type =='2'){
- layer.msg("即办事项最高分值为5分", {
- time: 1500,
- icon: 2
- });
- return
- }
- $.post(huayi.config.callcenter_url + 'Department/Evaluation', {
- deptid: id,
- type:type,
- ScoreTime: dateT,
- Score: $("#score").val(),
- Remarks: $("#remark").val(), //回访内容
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.initTable();
- parent.layer.msg("操作成功");
- }
- })
- }
- function JD(){
- var nowDate = new Date().getFullYear() + '-' + (new Date().getMonth() + 1) +'-' + new Date().getDate()
- if(Number($('#score').val())>0){
- layer.msg("此为减分项", {
- time: 1500,
- icon: 2
- });
- return
- }
- $.post(huayi.config.callcenter_url + 'Department/Supervision', {
- deptid: id,
- ScoreTime: dateT,
- Score: Number($("#score").val()),
- Remarks: $("#remark").val(), //回访内容
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.initTable();
- parent.layer.msg("操作成功");
- }
- })
- }
- </script>
- </body>
- </html>
|