| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353 |
- <!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/addappeal.css" />
- <link rel="stylesheet" href="../css/layer/need/layer.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <title>监察</title>
- <style>
- .input {
- background-color: #FFF;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 1px;
- color: inherit;
- padding: 6px 12px
- }
- .fjnr {
- padding: 0 !important;
- border: none !important;
- }
- .Common {
- height: 90%;
- }
- .whetherSupervise {
- display: none;
- }
- </style>
- </head>
- <body>
- <div class="Common">
- <table>
- <tr>
- <th class="Importent title">督查意见:</th>
- <td><textarea data-adaptheight id='overseeopinion' textarea name="" rows="4" cols=""></textarea></td>
- </tr>
- <tr>
- <th>附件上传:</th>
- <td colspan="7">
- <!--<span class="fjnr"></span>-->
- <div class="fileBox">
- <!--<span class="files">文件1<i class="fa fa-remove"></i></span>-->
- </div>
- <input class="input" type="file" name="upFile" id="upFile" multiple="multiple"
- style="display: none;">
- <input class="input" type="button" value="上传" id="scwj" />
- <input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />
- <input type="hidden" id="file" />
- <span style="color:#FF0000; border: none;">
- (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
- </span>
- </td>
- </tr>
- <tr class="whetherSupervise">
- <th>交办单位:</th>
- <td colspan="1">
- <select id="jbSelect" name="select" class="selectpicker show-tick form-control" multiple
- data-live-search="true">
- </select>
- </td>
- </tr>
- <tr class="whetherSupervise limittimeWrapper">
- <th>办理时限:</th>
- <td colspan="">
- <select class="startTime" id="startTime" style="width: 200px; height: 30px; line-height: 30px;">
- <!--<option value="0">选择</option>-->
- <option value="1">一天</option>
- <option value="3">三天</option>
- <option value="5">五天</option>
- <option value="7">七天</option>
- </select>
- </td>
- </tr>
- <tr class="whetherSupervise limittimesWrapper">
- <th>紧急时限:</th>
- <td colspan="">
- <input type="text" id="limittimes">
- </td>
- </tr>
- </table>
- <div class="btn_box">
- <button class="btns DB">保存</button>
- <button class="btns JC">保存</button>
- </div>
- </div>
- <script src="../js/adjustHeight.js"></script>
- <script src="../js/bootstrap-select.js"></script>
- <script src="../css/laydate/laydate.js"></script>
- <script>
- var wid = helper.request.queryString("wid");
- var type = helper.request.queryString("type");
- var state = helper.request.queryString("state");
- var depId = helper.request.queryString("depId");
- var pageName = helper.request.queryString("pageName");
- var level;
- $(document).ready(function () {
- laydate.skin("blue");
- laydate({
- elem: "#limittimes",
- event: "focus",
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
- jbSelect($("#jbSelect"));
- if (type == 1) {
- if (state == 1) {
- $(".title").text("督办意见");
- $(".JC").hide();
- if (pageName === "superviseUpcoming") {
- $('.whetherSupervise').show();
- } else if (pageName === "haveAduit") {
- $('.whetherSupervise').hide();
- }
- } else {
- $(".title").text("不督办意见");
- $(".JC").hide();
- $('.whetherSupervise').hide();
- }
- } else {
- $(".title").text("监察意见")
- $(".DB").hide();
- }
- if (wid) {
- $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrderNew', {
- workorderid: wid,
- type: 0,
- "token": $.cookie("token")
- }, function (result) {
- if (result.state.toLowerCase() == "success") {
- var content = result.data;
- level = content.data[0].F_Level + ""
- if (pageName === "superviseUpcoming") {
- if (level === "1") {
- $(".limittimesWrapper").hide()
- $(".limittimeWrapper").show()
- } else {
- $(".limittimesWrapper").show()
- $(".limittimeWrapper").hide()
- }
- } else if (pageName === "haveAduit") {
- $('.whetherSupervise').hide();
- }
- }
- })
- }
- $(".DB").click(function () {
- if ($("#overseeopinion").val() == '') {
- layer.msg("意见不能为空");
- } else {
- type = 1;
- JA();
- }
- })
- $(".JC").click(function () {
- if ($("#overseeopinion").val() == '') {
- layer.msg("意见不能为空");
- } else {
- type = 2;
- JA();
- }
- })
- //上传附件
- $("#scwj").click(function () {
- $("#upFile").trigger("click");
- })
- $("#upFile").change(function () {
- upload();
- })
- })
- //发送短信
- function sendMessage() {
- $.post(huayi.config.callcenter_url + 'WorkOrder/SendSms', {
- workordercode: wid,
- deptid: depId, //承办单位
- type: 1,
- token: $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == 'success') {
- layer.msg('发送短信成功')
- }
- })
- }
- //督察
- function JA() {
- $.post(huayi.config.callcenter_url + 'WorkOrder/RemindWorkOrder', {
- workorderid: wid,
- overseeopinion: $("#overseeopinion").val(),
- type: type,
- state: state,
- files: $("#file").val(),
- "token": $.cookie("token")
- }, function (result) {
- result = JSON.parse(result);
- if (result.state.toLowerCase() == "success") {
- parent.$('#orderlist').bootstrapTable('refresh');
- parent.layer.msg("操作成功");
- $('.fileBox').html('');
- console.log("state", state, typeof (state))
- if (state === "1") {
- if (pageName === "superviseUpcoming") {
- jb()
- } else if (pageName === "haveAduit") {
- hf()
- }
- } else {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- }
- }
- })
- }
- //上传文件
- function upload() {
- var Files = document.getElementById("upFile").files;
- if (Files.length > 0) {
- var formData = new FormData();
- for (var i = 0; i < Files.length; i++) {
- formData.append('file' + i, Files[i]);
- }
- formData.append("token", $.cookie("token"));
- var typeName = Files[0].name.split('.')[1];
- if (typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'mp3' || typeName ==
- 'pdf' || typeName == 'doc' || typeName == 'docx' || typeName == 'xls' || typeName == 'xlsx') {
- $.ajax({
- url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
- type: "POST",
- data: formData,
- /**
- *必须false才会自动加上正确的Content-Type
- */
- contentType: false,
- /**
- * 必须false才会避开jQuery对 formdata 的默认处理
- * XMLHttpRequest会对 formdata 进行正确的处理
- */
- processData: false,
- success: function (result) {
- document.getElementById("upFile").outerHTML = document.getElementById("upFile")
- .outerHTML;
- $("#upFile").change(function () {
- upload();
- });
- var r = $.parseJSON(result);
- if (r.state.toLowerCase() == "success") {
- $(".fjnr").text(r.data[0].F_FileName);
- var a = r.data;
- // var str = '';
- // var Str;
- $(a).each(function (i, n) {
- var strs = '<span class="files" fiel-num="' + n.F_FileId +
- '">' + n.F_FileName.substring(19) +
- '<i class="fa fa-remove del_file"></i></span>'
- $(strs).appendTo($('.fileBox')).find('.del_file').click(
- function (event) {
- event.stopPropagation();
- $(this).parent().remove();
- file_num();
- })
- })
- file_num();
- }
- }
- });
- } else {
- layer.msg("格式不正确");
- }
- } else {
- layer.confirm('请上传文件!', {
- btn: ['确定']
- });
- }
- }
- //上传文件隐藏域值
- function file_num() {
- var str = '';
- var Str;
- $('.fileBox .files').each(function (j, m) {
- var aa = $(m).attr("fiel-num")
- console.log(aa);
- str += aa + ",";
- Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
- })
- $("#file").val(Str);
- }
- //交办
- function jb() {
- var jbSelect = $("#jbSelect").val();
- var startTime = $("#startTime").val();
- var limittimes = $("#limittimes").val();
- layer.open({
- type: 2,
- content: "../CommonHtml/jiaoban.html?wid=" + wid + "&jbSelect=" + jbSelect + "&startTime=" +
- startTime + "&limittimes=" + limittimes + "&level=" + level, //iframe的url,no代表不显示滚动条
- title: '工单交办',
- area: ['95%', '95%'], //宽高
- });
- }
- //诉求回访
- function hf() {
- layer.open({
- type: 2,
- content: "../CommonHtml/Back.html?wid=" + wid, //iframe的url,no代表不显示滚动条
- title: '工单回访',
- area: ['95%', '95%'], //宽高
- });
- }
- function jbSelect(obj) {
- obj.empty();
- $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
- "token": $.cookie("token"),
- "iscbdw": 1,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $("<option value=''>请选择</option>").appendTo(obj);
- $(content).each(function (i, n) {
- $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(
- obj);
- })
- obj.selectpicker({
- noneSelectedText: '请选择' //默认显示内容
- });
- obj.selectpicker('refresh');
- }
- })
- }
- // 关闭弹出页
- function closePage() {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.$("#orderlist").bootstrapTable("refresh");
- parent.layer.msg("操作成功");
- }
- </script>
- </body>
- </html>
|