| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <!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 rel="stylesheet" href="../css/bootstrap-select.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <title>添加</title>
- <style>
- .Common table th {
- width: 100px
- }
- .auditState {
- display: none;
- }
- </style>
- </head>
- <body>
- <div class="wrapper wrapper-content animated fadeInRight">
- <div style="padding: 10px" class="tj_content clearFix">
- <div class="Common">
- <table>
- <tr>
- <th>审核状态:</th>
- <td colspan="7">
- <select name="auditState" class="form-control" id="auditState">
- <option value="0">审核通过</option>
- <option value="1">审核不通过</option>
- <option value="2">审核通过转办</option>
- </select>
- </td>
- </tr>
- <tr class="auditState">
- <th>审核说明:</th>
- <td colspan="7">
- <textarea id="cbreason" class="form-control" name="" rows="" cols="" style=""></textarea>
- </td>
- </tr>
- <tr>
- <td colspan="8" style="text-align: center">
- <button class="btns save">保存</button>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <script>
- var wid = helper.request.queryString("wid");
- var nexttype;
- $(document).ready(function () {
- $(".save").click(function () {
- Add()
- });
- $("#auditState").change(function(){
-
- if (Number($("#auditState").val())) {
- $(".auditState").show()
- } else {
- $(".auditState").hide()
- $("#cbreason").val('')
- }
- // Number($("#auditState").val()) ? $(".auditState").show():$(".auditState").hide()
- })
- });
- //修改工单
- function Add() {
-
- nexttype =Number($("#auditState").val())
- if (nexttype === 0) {
- layer.confirm('确认审核通过吗?', {
- btn: ['是', '否'] //按钮
- }, function () {
- layer.confirm('是否发送短信?', {
- btn: ['是', '否'] //按钮
- }, function () {
- toExamineWorkOrder(1,nexttype)
- },function(){
- toExamineWorkOrder(0,nexttype)
- });
- });
- } else if(nexttype===1 || nexttype ===2){
- $("#cbreason").show()
- toExamineWorkOrder()
- }
- }
- function toExamineWorkOrder(issmsAudit){
-
- $.post(huayi.config.callcenter_url + 'WorkOrder/ToExamineWorkOrder', {
- workorderid: wid,
- nexttype: nexttype, // 0审核通过 1审核不通过 2审核通过转办
- issms:issmsAudit,
- cbreason: $("#cbreason").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.$("#orderlist").bootstrapTable("refresh");
- parent.layer.msg("操作成功");
- }
- })
-
- }
- </script>
- </body>
- </html>
|