| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661 |
- <!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>
- <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;
- }
- </style>
- </head>
- <body>
- <div class="Common">
- <table>
- <tr>
- <th class="Importent">承办人:</th>
- <td>
- <input id="dealman" type="text" style="height: 32px" />
- </td>
- <th class="Importent">联系方式:</th>
- <td>
- <input type="text" id="dealcontact" />
- </td>
- <th class="Importent">职务:</th>
- <td>
- <input type="text" id="duties" />
- </td>
- </tr>
- <tr>
- <th class="Importent">处理结果:</th>
- <td colspan="5">
- <textarea
- data-adaptheight
- id="situation"
- name=""
- rows="6"
- cols=""
- ></textarea>
- </td>
- </tr>
- <tr>
- <th class="Importent">是否有处理结果:</th>
- <td id="isProResultRadio" style="font-size: 12px">
- <label style="margin-right: 10px">
- <input
- type="radio"
- value="1"
- name="isDisposeResult"
- style="vertical-align: -2px"
- />是
- </label>
- <label>
- <input
- type="radio"
- value="2"
- name="isDisposeResult"
- style="vertical-align: -2px"
- />已办未果
- </label>
- </td>
- </tr>
- <tr class="dealWithRemark-wrapper">
- <th>已办未果备注:</th>
- <td colspan="5">
- <textarea
- data-adaptheight
- id="dealWithRemark"
- name=""
- rows="6"
- cols=""
- ></textarea>
- </td>
- </tr>
- <tr class="prosituation-wrapper">
- <th>处理方案/进程:</th>
- <td colspan="5">
- <textarea
- data-adaptheight
- id="prosituation"
- name=""
- rows="6"
- cols=""
- ></textarea>
- </td>
- </tr>
- <tr class="annotation-wrapper">
- <th style="color: #ff0000">注释:</th>
- <td style="color: #ff0000" colspan="5">
- 请提交加盖单位公章的相关说明文件,不添加文件说明将被扣考核分
- </td>
- </tr>
- <tr class="connecttime-wrapper">
- <th>沟通时间:</th>
- <td>
- <input
- type="text"
- class="laydate-icon"
- id="connecttime"
- style="
- width: 172px;
- height: 32px;
- border-color: rgb(158, 158, 158);
- "
- />
- </td>
- </tr>
- <tr class="connectmode-wrapper">
- <th>沟通方式:</th>
- <td>
- <input type="text" id="connectmode" />
- </td>
- </tr>
- <tr class="isstaisfied-wrapper">
- <th>是否满意:</th>
- <td
- id="isStaisfiedRadio"
- style="font-size: 12px"
- colspan="5"
- >
- <label style="margin-right: 10px">
- <input
- type="radio"
- value="1"
- name="isstaisfied"
- style="vertical-align: -2px"
- />满意
- </label>
- <label style="margin-right: 10px">
- <input
- type="radio"
- value="2"
- name="isstaisfied"
- style="vertical-align: -2px"
- />基本满意
- </label>
- <label style="margin-right: 10px">
- <input
- type="radio"
- value="3"
- name="isstaisfied"
- style="vertical-align: -2px"
- />不满意
- </label>
- </td>
- </tr>
- <tr class="files-wrappper">
- <th class="Importent">附件:</th>
- <td colspan="5">
- <div class="fileBox"></div>
- <!--<span class="fjnr"></span>-->
- <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>
- <td>
- <button class="btns handleBtn">查看办理结果</button>
- </td>
- <td colspan="5">
- <textarea
- data-adaptheight
- id="result"
- name=""
- rows="4"
- cols=""
- ></textarea>
- </td>
- <input type="hidden" id="ID" />
- </tr>
- </table>
- <div class="btn_box">
- <button class="btns BC">保存</button>
- <button class="btns Submit">保存并办理</button>
- </div>
- </div>
- <script src="../css/laydate/laydate.js"></script>
- <script src="../js/adjustHeight.js"></script>
- <script>
- var wid = helper.request.queryString("wid");
- var isProtect = helper.request.queryString("isProtect");
- var State;
- var a = $("#ID").val();
- var simpleDetailStrStart = "";
- var simpleDetailStrEnd = "";
- var simpleDetailStr = "";
- Detail();
- $(document).ready(function () {
- laydate.skin("blue");
- laydate({
- elem: "#connecttime",
- event: "focus",
- istoday: true,
- istime: true,
- type: "datetime",
- format: "YYYY-MM-DD hh:mm:ss",
- });
- simpleDetail();
- //上传附件
- $("#scwj").click(function () {
- $("#upFile").trigger("click");
- });
- $("#upFile").change(function () {
- upload();
- });
- $("#scfj").click(function () {
- $(".fjnr").text("");
- $("#scfj").hide();
- });
- $(".BC").click(function () {
- if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == "1") {
- if ($("#dealman").val() == "") {
- layer.msg("办理人不能为空");
- } else if ($("#situation").val() == "") {
- layer.msg("处理情况不能为空");
- } else if ($("#dealcontact").val() == "") {
- layer.msg("联系方式不能为空");
- } else if ($("#duties").val() == "") {
- layer.msg("职务不能为空");
- } else if ($("#result").val() == "") {
- layer.msg("请生成办理结果");
- } else {
- State = 0;
- JA();
- }
- } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == "2") {
- State = 0;
- JA();
- } else {
- layer.msg("处理结果不能为空");
- }
- });
- $(".Submit").click(function () {
- if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == "1") {
- if ($("#dealman").val() == "") {
- layer.msg("办理人不能为空");
- } else if ($("#situation").val() == "") {
- layer.msg("处理情况不能为空");
- } else if ($("#dealcontact").val() == "") {
- layer.msg("联系方式不能为空");
- } else if ($("#duties").val() == "") {
- layer.msg("职务不能为空");
- } else if ($("#result").val() == "") {
- layer.msg("请生成办理结果");
- } else {
- State = 1;
- JA();
- }
- } else if ($('#isProResultRadio input[name="isDisposeResult"]:checked').val() == "2") {
- State = 1;
- JA();
- } else {
- layer.msg("处理结果不能为空");
- }
- });
- $(".prosituation-wrapper").hide(); //处理方案/进程
- $(".annotation-wrapper").hide(); //注释
- $(".connecttime-wrapper").hide(); //沟通时间
- $(".connectmode-wrapper").hide(); //沟通方式
- // $(".replycontent-wrapper").hide(); //答复内容
- $(".isstaisfied-wrapper").hide(); //是否满意
- $(".dealWithRemark-wrapper").hide(); // 已办未果备注
- /*
- * 处理结果
- * 默认 0
- * 是 1
- * 否 2
- */
- $("#isProResultRadio")
- .find('input[type="radio"]')
- .on("change", function () {
- $("#prosituation").val(""); //处理方案/进程
- $("#connecttime").val(""); //沟通时间
- $("#connectmode").val(""); //沟通方式
- // $("#replycontent").val(""); //答复内容
- $("#result").val(""); //办理结果
- $(
- '#isStaisfiedRadio input[name="isstaisfied"]:checked'
- ).prop("checked", false); //是否满意
- isProResultJudge($(this).val());
- });
- $(".handleBtn").click(function () {
- if (
- $(
- '#isProResultRadio input[name="isDisposeResult"]:checked'
- ).val() === "1"
- ) {
- if (isProtect === "1") {
- simpleDetailStrEnd =
- "经落实,具体情况回复如下:" +
- $("#situation").val() +
- " 办理结果:" +
- "已办理 承办人:" +
- $("#dealman").val() +
- " 职务:" +
- $("#duties").val() +
- " 联系电话:" +
- $("#dealcontact").val();
- simpleDetailStr =
- simpleDetailStrStart + simpleDetailStrEnd;
- $("#result").val(simpleDetailStr);
- } else if (isProtect === "0") {
- if (
- $(
- '#isStaisfiedRadio input[name="isstaisfied"]:checked'
- ).val() === "0"
- ) {
- var isStaisfiedRadioData = "未评价";
- } else if (
- $(
- '#isStaisfiedRadio input[name="isstaisfied"]:checked'
- ).val() === "1"
- ) {
- var isStaisfiedRadioData = "满意";
- } else if (
- $(
- '#isStaisfiedRadio input[name="isstaisfied"]:checked'
- ).val() === "2"
- ) {
- var isStaisfiedRadioData = "基本满意";
- } else if (
- $(
- '#isStaisfiedRadio input[name="isstaisfied"]:checked'
- ).val() === "3"
- ) {
- var isStaisfiedRadioData = "不满意";
- } else {
- var isStaisfiedRadioData = "未评价";
- }
- simpleDetailStrEnd =
- "经落实,具体情况回复如下:" +
- $("#situation").val() +
- " 办理结果:" +
- "已办理 承办人:" +
- $("#dealman").val() +
- " 职务:" +
- $("#duties").val() +
- " 联系电话:" +
- $("#dealcontact").val() +
- "; " +
- $("#dealman").val() +
- "用" +
- $("#connectmode").val() +
- "方式在" +
- $("#connecttime").val() +
- "对反映人进行了回复,反映人对结果表示" +
- isStaisfiedRadioData;
- simpleDetailStr =
- simpleDetailStrStart + simpleDetailStrEnd;
- $("#result").val(simpleDetailStr);
- }
- } else if (
- $(
- '#isProResultRadio input[name="isDisposeResult"]:checked'
- ).val() === "2"
- ) {
- simpleDetailStrEnd =
- "经落实,具体情况回复如下:" +
- $("#situation").val() +
- " 办理结果:" +
- "未办理 承办人:" +
- $("#dealman").val() +
- " 职务:" +
- $("#duties").val() +
- " 联系电话:" +
- $("#dealcontact").val() +
- "; 处理方案/进程:" +
- $("#prosituation").val();
- simpleDetailStr =
- simpleDetailStrStart + simpleDetailStrEnd;
- $("#result").val(simpleDetailStr);
- } else {
- simpleDetailStr =
- simpleDetailStrStart + simpleDetailStrEnd;
- $("#result").val(simpleDetailStr);
- }
- });
- });
- //交办
- function JA() {
- $.post(
- huayi.config.callcenter_url + "WorkOrder/FeedBackWorkOrder",
- {
- workorderid: wid,
- dealman: $("#dealman").val(), //承办人
- dealcontact: $("#dealcontact").val(), //联系方式
- duties: $("#duties").val(), //职务
- situation: $("#situation").val(), //处理情况
- result: $("#result").val(), //办理结果
- isproresult: $(
- '#isProResultRadio input[name="isDisposeResult"]:checked'
- ).val(), //处理结果
- IsProResult: $(
- '#isProResultRadio input[name="isDisposeResult"]:checked'
- ).val(), // 已办未果
- IsProResultState: "", // 已办未果状态
- prosituation: $("#prosituation").val(), //处理方案/进程
- Unsuccessful: $("#dealWithRemark").val(), //已办未果备注
- connecttime: $("#connecttime").val(), //沟通时间
- connectmode: $("#connectmode").val(), //沟通方式
- // replycontent: $("#replycontent").val(), //答复内容
- isstaisfied: $(
- '#isStaisfiedRadio input[name="isstaisfied"]:checked'
- ).val(), //是否满意
- state: State,
- feedbackid: a,
- files: $("#file").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("办理成功");
- $(".fileBox").html("");
- }
- }
- );
- }
- //草稿详情
- function Detail() {
- $.getJSON(
- huayi.config.callcenter_url + "WorkOrder/GetDraftInfo",
- {
- workorderid: wid,
- type: 2,
- token: $.cookie("token"),
- },
- function (result) {
- if (result.state.toLowerCase() == "success") {
- if (result.data.length > 0) {
- var IsProResultValue =
- result.data[0].F_IsProResult + "";
- isProResultJudge(IsProResultValue);
- $("#dealman").val(result.data[0].F_DealUser); //承办人
- // $("#result").text(result.data[0].F_Result); //办理结果
- $("#situation").val(result.data[0].F_Situation); //处理情况
- $("#duties").val(result.data[0].F_Duties); //职务
- $(
- '#isProResultRadio input[name="isDisposeResult"][value="' +
- result.data[0].F_IsProResult +
- '"]'
- ).prop("checked", true); //是否有处理结果
- $("#prosituation").val(
- result.data[0].F_ProSituation
- ); //处理方案/进程
- $("#dealcontact").val(
- result.data[0].F_DealUserContact
- ); //联系方式
- $("#connecttime").val(
- result.data[0].F_ConnectTime
- ); //沟通时间
- $("#connectmode").val(
- result.data[0].F_ConnectMode
- ); //沟通方式
- // $("#replycontent").val(result.data[0].F_ReplyContent); //答复内容
- $(
- '#isStaisfiedRadio input[name="isstaisfied"][value="' +
- result.data[0].F_IsSatisfied +
- '"]'
- ).prop("checked", true); //是否满意
- a = result.data[0].F_Id;
- }
- }
- }
- );
- }
- //清除
- function Clean() {
- $("#startTime").val(""), $("#assignedopinion").val("");
- }
- //上传文件
- 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;
- $(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 isProResultJudge(isProResultdata) {
- if (isProResultdata === "1") {
- if (isProtect === "1") {
- $(".prosituation-wrapper").hide(); //处理方案/进程
- $(".annotation-wrapper").hide(); //注释
- $(".connecttime-wrapper").hide(); //沟通时间
- $(".connectmode-wrapper").hide(); //沟通方式
- // $(".replycontent-wrapper").hide(); //答复内容
- $(".isstaisfied-wrapper").hide(); //是否满意
- $(".dealWithRemark-wrapper").hide(); // 已办未果备注
- } else if (isProtect === "0") {
- $(".prosituation-wrapper").hide(); //处理方案/进程
- $(".annotation-wrapper").hide(); //注释
- $(".connecttime-wrapper").show(); //沟通时间
- $(".connectmode-wrapper").show(); //沟通方式
- // $(".replycontent-wrapper").show(); //答复内容
- $(".isstaisfied-wrapper").show(); //是否满意
- $(".dealWithRemark-wrapper").hide(); // 已办未果备注
- }
- } else if (isProResultdata === "2") {
- $(".prosituation-wrapper").show(); //处理方案/进程
- $(".annotation-wrapper").show(); //注释
- $(".connecttime-wrapper").hide(); //沟通时间
- $(".connectmode-wrapper").hide(); //沟通方式
- // $(".replycontent-wrapper").hide(); //答复内容
- $(".isstaisfied-wrapper").hide(); //是否满意
- $(".dealWithRemark-wrapper").show(); // 已办未果备注
- }
- }
- //简易版工单详情
- function simpleDetail() {
- $.getJSON(
- huayi.config.callcenter_url + "WorkOrder/GetWorkorderSimp",
- {
- workorderid: wid,
- token: $.cookie("token"),
- },
- function (result) {
- if (result.state.toLowerCase() == "success") {
- var data = result.data[0];
- simpleDetailStrStart =
- data.F_CreateTime +
- " " +
- data.deptname +
- "部门接到" +
- data.SourceName +
- "来源工单(编号:" +
- data.F_WorkOrderId +
- ")反映" +
- data.F_ComTitle +
- "问题,";
- }
- }
- );
- }
- </script>
- </body>
- </html>
|