123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- var t;
- function Load() {
- t = mui.showLoading("加载中...", "div");
- ///获取详情信息
- $.post("/Complaint/GetComplaintDetail/" + id, {}, function (data) {
- $.each(data, function (idx, json) {
- document.getElementById("Name").innerHTML = json.用户姓名;
- $("#Time").html(json.登记时间);
- $("#Departments").html(json.部门名);
- $("#ComplaintType").html(json.显示名);
- $("#Events").html(json.投诉事件);
- $("#Elaborate").html(json.投诉描述);
- $("#Current").html(json.描述);
- var Status = "";
- switch (json.状态) {
- case 0:
- Status = "未处理";
- break;
- case 1:
- Status = "处理中";
- break;
- case 2:
- Status = "已处理";
- break;
- }
- $("#status").html(Status);
- });
- });
- ///获取图片
- $.post("/ComplaintManage/GetComplaintFileFromFTP/" + id, {}, function (data) {
- $.each(data, function (idx, json) {
- $("#fileList").append("<li class='mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3' style='padding-left: 3px;'><img data-preview-src='' data-preview-group='1' src='" + json.base64ToImage + "' style='width:100px;height:100px'></li>")
- });
- mui.hideLoading(t);
- });
- ///获取处理流程
- $.post("/ComplaintManage/GetDealProcess/" + id, {}, function (data) {
- $("#mitem1").append("<section id='cd-timeline' class='cd-container'></section>")
- $.each(data, function (idx, json) {
- var det = "暂无描述";
- if (json.描述 != null) {
- det = json.描述;
- }
- $("#cd-timeline").append("<div class='cd-timeline-block'><div class='cd-timeline-img cd-picture'><img src='/Content/Scripts/plugins/mui/fonts/cd-icon-picture.svg' alt='Picture' /></div><div class='cd-timeline-content'><h2 id='ProcessStatus'>" + json.变更状态 + "</h2><p id='ProcessDescribe'>" + det + "</p><p id='ProcessPerson'>" + json.职务 + "-" + json.记录人 + "</p><span id='ProcessTime' class='cd-date'>" + json.记录时间 + "</span></div></div>");
- });
-
- });
- GetCommunicate();
- }
- ////获取过程沟通
- function GetCommunicate() {
- $("#MyCommunicate").empty();
- $.post("/ComplaintManage/GetCommunicate/" + id, {}, function (data) {
- if (data.length == 0) {
- $("#MyCommunicate").append("<h5 style='display:flex;flex-direction:column;justify-content:center;align-items:center;height:100px;;font-size:20px '>暂无沟通内容</h5>");
- return;
- }
- $.each(data, function (idx, json) {
- $("#MyCommunicate").append("<div class='mui-card'><div class='mui-card-header mui-card-media' style='height:100px ;'><img src='/Content/Images/Account/wtx.jpg' style='border-radius: 80px; height: 50px; width: 50px;'><p style='float: right;' >" + json.沟通时间 + "</p><div class='mui-media-body' style='margin-left: 60px'><h4 id=''>" + json.沟通人 + "</h4><h5 id='' style='margin-top:10px'>" + json.沟通内容 + "</h5><h5 id='' style='float:right;'>" + json.沟通人职务 + "</h5></div></div></div>")
- });
- })
- }
- ///撤销投诉
- function DeleteComplaint() {
- var btnArray = ['否', '是'];
- mui.confirm('是否确认撤销投诉?', '提示', btnArray, function (e) {
- if (e.index == 1) {
- $.post("/Complaint/DeleteComplaint/" + id, {}, function (data) {
- if (data.code == 200) {
- mui.alert("您所提交的投诉已撤销!", "撤销成功", "确定", function () { window.location.href = "/Complaint/QueryComplaint"; }, 'div');
- } else {
- mui.alert("您所提交的投诉正在处理中!", "撤销失败", "确定", function () { return; }, 'div');
- }
- })
- } else {
- }
- })
- }
- ///提交过程沟通
- function SubmitCmt() {
- var Content = $("#textarea").val();
- if (Content == "" || Content == null) {
- mui.toast('请输入内容', { duration: 'long', type: 'div' });
- return;
- }
- var url = "/ComplaintManage/SubmitCmt/" + id + "?Content=" + Content;
- $.post(url, {}, function (data) {
- if (data.code == 200) {
- GetCommunicate();
- } else {
- mui.toast('提交错误!请查看日志!', { duration: 'long', type: 'div' });
- }
- })
- }
|