569 lines
25 KiB
Plaintext
569 lines
25 KiB
Plaintext
@using WX.CRM.WebHelper;
|
||
@{
|
||
ViewBag.Title = "Index";
|
||
Layout = "~/Views/Shared/_content.cshtml";
|
||
}
|
||
|
||
<script src="/Scripts/jquery.easyui.min.js" type="text/javascript"></script>
|
||
<link href="/Content/themes/blue/easyui.css" rel="stylesheet" />
|
||
<link href="/Content/Site.css" rel="stylesheet" />
|
||
<script src="/Scripts/common.js"></script>
|
||
<link href="/Content/data_grid_list.css" rel="stylesheet" />
|
||
<script src="/Scripts/op/jquery.rewrite.js"></script>
|
||
|
||
<style>
|
||
.self-table-click td {
|
||
background-color: #f3ebbc;
|
||
}
|
||
|
||
.layui-table-cell {
|
||
height: auto !important;
|
||
line-height: 28px !important;
|
||
}
|
||
</style>
|
||
|
||
<div class="layui-fluid" style="padding-left:0px;padding-top:10px;">
|
||
|
||
|
||
|
||
<div class="layui-card" id="topcard" style="width:100%;padding-top:10px;">
|
||
<div class="layui-card-header layui-self-header">
|
||
<div style="float:left;position:relative;">
|
||
内诉处理列表
|
||
</div>
|
||
<div style="float:right;position:relative;">
|
||
@Html.Action("ToolBarNew", "Control", new
|
||
{
|
||
tool = ViewBag.ToolBar as ToolBar,
|
||
otherToolBars = new ToolBarNew[] {
|
||
new ToolBarNew(){ btnColor="", btnName="处理回复" },
|
||
new ToolBarNew(){ btnColor="", btnName="查看回复" },
|
||
new ToolBarNew(){ btnColor="", btnName="延长期限" },
|
||
new ToolBarNew(){ btnColor="", btnName="调整期限" },
|
||
new ToolBarNew(){ btnColor="", btnName="导出" }
|
||
}
|
||
|
||
})
|
||
|
||
|
||
</div>
|
||
<div class="hrclass" style="position:relative;float: left;"></div>
|
||
</div>
|
||
<div class="layui-card-body " id="contentBody">
|
||
<form class="layui-form selftopwhere" id="myform">
|
||
<div class="layui-form-item">
|
||
@{ List<WX.CRM.Model.Entity.BAS_BUSINESSLINES> list = ViewBag.deptList; }
|
||
事业部:
|
||
<div class="layui-inline">
|
||
<select name="Deptid">
|
||
<option value="">全部</option>
|
||
@foreach (var item in list)
|
||
{
|
||
<option value="@item.BUSINESSID">@item.BUSINESSNAME</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
<div class="layui-inline" style="width:460px;">
|
||
@Html.Action("UserSSOComBox", "Control", new { currentRight = WX.CRM.WebHelper.InitRights.内诉处理列表 })
|
||
</div>
|
||
内诉渠道:
|
||
<div class="layui-inline">
|
||
<select name="inComplaintChannel" style="height:35px;">
|
||
<option value="">全部</option>
|
||
<option value="1">400申诉热线</option>
|
||
<option value="2">投诉留言</option>
|
||
<option value="4">业务部反馈</option>
|
||
<option value="8">微信后台</option>
|
||
</select>
|
||
</div>
|
||
投诉原因:
|
||
<div class="layui-inline">
|
||
<select name="reason" style="height:35px;">
|
||
<option value="">全部</option>
|
||
<option value="1">亏损</option>
|
||
<option value="2">宣传不符</option>
|
||
<option value="4">服务不满</option>
|
||
<option value="8">产品不合适</option>
|
||
<option value="16">个人原因</option>
|
||
<option value="32">拖延退款</option>
|
||
<option value="64">5个工作日无理由</option>
|
||
</select>
|
||
</div>
|
||
内诉状态:
|
||
<div class="layui-inline">
|
||
<select name="inComplaintStatus" style="height:35px;">
|
||
<option value="">全部</option>
|
||
<option value="1">跟进中</option>
|
||
<option value="2">暂安抚</option>
|
||
<option value="4">已办结</option>
|
||
</select>
|
||
</div>
|
||
业务处理状态:
|
||
<div class="layui-inline">
|
||
<select name="businessStatus" style="height:35px;">
|
||
<option value="">全部</option>
|
||
<option value="1">待处理</option>
|
||
<option value="2">到期未处理</option>
|
||
<option value="4">委托合规处理</option>
|
||
<option value="8">已办结</option>
|
||
</select>
|
||
</div>
|
||
到期状态:
|
||
<div class="layui-inline">
|
||
<select name="orderStatus" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
<option value="1">未到期</option>
|
||
<option value="2">已到期</option>
|
||
</select>
|
||
</div>
|
||
投诉单号:
|
||
<div class="layui-inline">
|
||
<input type="text" name="complaintId" placeholder="" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
客户ID:
|
||
<div class="layui-inline">
|
||
<input type="text" name="resid" placeholder="" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
客户姓名:
|
||
<div class="layui-inline">
|
||
<input type="text" name="cname" placeholder="" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
成交客服/工号:
|
||
<div class="layui-inline">
|
||
<input type="text" name="eid" placeholder="" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
已退订单号:
|
||
<div class="layui-inline">
|
||
<input type="text" name="orderid" placeholder="" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
提交人/回复人:
|
||
<div class="layui-inline">
|
||
<input type="text" name="creaetOrUpdateUser" placeholder="" autocomplete="off" class="layui-input" style="width:120px;">
|
||
</div>
|
||
<div class="layui-inline">
|
||
<select name="dateType" style="height:35px;">
|
||
<option value="1">客户内诉日期</option>
|
||
<option value="2">提交日期</option>
|
||
<option value="16">回复日期</option>
|
||
</select>
|
||
</div>
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="" name="dateFrom" id="dateFrom" style="width:120px;">
|
||
</div>
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="" name="dateTo" id="dateTo" style="width:120px;">
|
||
</div>
|
||
|
||
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search" type="button" value="查询" />
|
||
<input class="layui-btn layui-btn-sm layui-btn-reset" type="reset" value="清空" />
|
||
@*<input class="layui-btn layui-btn-sm layui-btn-warm" data-method="settingList" type="button" value="设置列" />*@
|
||
|
||
<div class="layui-inline">
|
||
@Html.Action("SettingList", "Control", new { eid = ViewBag.eid, module = "SeatInComplaint" })
|
||
</div>
|
||
</div>
|
||
</form>
|
||
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="modalwindow" class="easyui-window" data-options="modal:true,closed:true,minimizable:false,shadow:false"></div>
|
||
|
||
|
||
<script>
|
||
layui.use('laydate', function () {
|
||
var laydate = layui.laydate;
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#dateFrom' //指定元素
|
||
});
|
||
//执行一个laydate实例
|
||
laydate.render({
|
||
elem: '#dateTo' //指定元素
|
||
});
|
||
});
|
||
|
||
var selectRow = {};
|
||
var winindex;
|
||
var layer;
|
||
var rowid;
|
||
var tableCols;
|
||
var table;
|
||
//注意:选项卡 依赖 element 模块,否则无法进行功能性操作
|
||
layui.use(['laypage', 'layer', 'table', 'laydate', 'form'], function () {
|
||
var form = layui.form;
|
||
var laydate = layui.laydate;
|
||
layer = layui.layer;
|
||
table = layui.table;
|
||
|
||
|
||
$.ajax({
|
||
type: "GET",
|
||
url: '/Control/GetTableFieldSettings?module=SeatInComplaint&eid=' + @Html.Raw(ViewBag.eid),
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
success: function (da) {
|
||
if (da.result) {
|
||
tableCols = [da.data];
|
||
table.render({
|
||
id: 'listReload',//列表别名ID
|
||
elem: '#tabl1',//表ID
|
||
url: 'GetHtmlList',
|
||
//even: true, //开启隔行背景
|
||
method: 'POST',
|
||
page: true,
|
||
//height: "full-160",
|
||
size: "sm",
|
||
cols: tableCols
|
||
|
||
//, request: {
|
||
// pageName: 'pageIndex' //页码的参数名称,默认:page
|
||
// , limitName: 'pageSize' //每页数据量的参数名,默认:limit
|
||
//}
|
||
, response: {
|
||
statusName: 'code' //规定数据状态的字段名称,默认:code
|
||
, statusCode: 0 //规定成功的状态码,默认:0
|
||
, msgName: 'message' //规定状态信息的字段名称,默认:msg
|
||
}
|
||
, parseData: function (res) { //res 即为原始返回的数据
|
||
return {
|
||
"code": res.code, //解析接口状态
|
||
"msg": res.msg, //解析提示文本
|
||
"count": res.count, //解析数据长度
|
||
"data": res.data //解析数据列表
|
||
};
|
||
}
|
||
, done: function (res, curr, count) {
|
||
// 保存行高的数组
|
||
//var height = [];
|
||
//// 遍历行,将所有行的高度保存到数组中
|
||
//$(".layui-table-body tr").each(function (index, val) {
|
||
// console.log("height-VAL" + index + $(val).height());
|
||
|
||
// height.push($(val).height());
|
||
//});
|
||
|
||
//console.log("height" + height);
|
||
//// 数组排序
|
||
//height.sort((a, b) => { return a - b });
|
||
//// 将行高设置为数组中最大的高度
|
||
//$(".layui-table-body tr").height(height[height.length - 1]);
|
||
|
||
//// 遍历表头,将表头的高度保存到数组中
|
||
//$(".layui-table-header th").each(function (index, val) {
|
||
// height.push($(val).height());
|
||
//});
|
||
//// 数组排序
|
||
//height.sort((a, b) => { return a - b });
|
||
//// 将表头的高度设置为数组中最大的高度
|
||
//$(".layui-table-header th").height(height[height.length - 1]);
|
||
|
||
//$(".layui-table-main tr").each(function (index, val) {
|
||
// console.log("height-VAL--" + index +"--" + $(val).height());
|
||
// $($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
|
||
// $($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
||
//});
|
||
|
||
|
||
//动态监听表头高度变化,冻结行跟着改变高度
|
||
$(".layui-table-header tr").resize(function () {
|
||
$(".layui-table-header tr").each(function (index, val) {
|
||
$($(".layui-table-fixed .layui-table-header table tr")[index]).height($(val).height());
|
||
});
|
||
});
|
||
//初始化高度,使得冻结行表头高度一致
|
||
$(".layui-table-header tr").each(function (index, val) {
|
||
$($(".layui-table-fixed .layui-table-header table tr")[index]).height($(val).height());
|
||
});
|
||
//动态监听表体高度变化,冻结行跟着改变高度
|
||
$(".layui-table-body tr").resize(function () {
|
||
$(".layui-table-body tr").each(function (index, val) {
|
||
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
|
||
});
|
||
});
|
||
//初始化高度,使得冻结行表体高度一致
|
||
$(".layui-table-body tr").each(function (index, val) {
|
||
$($(".layui-table-fixed .layui-table-body table tr")[index]).height($(val).height());
|
||
});
|
||
|
||
}
|
||
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||
, limit: 10
|
||
, page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
|
||
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh'] //自定义分页布局
|
||
//,curr: 5 //设定初始在第 5 页
|
||
, groups: 5 //只显示 1 个连续页码
|
||
|
||
}
|
||
, where: $("#myform").serializeFormJSON()
|
||
});
|
||
} else {
|
||
layer.msg(da.message, { icon: 2 });
|
||
}
|
||
},
|
||
error: function () {
|
||
layer.msg('操作失败!', { icon: 2 });
|
||
}
|
||
});
|
||
|
||
|
||
|
||
//table.render({
|
||
// id: 'listReload'//列表别名ID
|
||
// , elem: '#tabl1'
|
||
// , url: 'GetHtmlList'
|
||
// , method: 'POST'
|
||
// , cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||
// , page: true
|
||
// , limit: 30
|
||
// , height: "full-160"
|
||
// , size: "sm"
|
||
// , cols: [[
|
||
// { field: 'id', title: 'ID', hide: true }
|
||
// , { field: 'complaintId', title: '投诉单号' }
|
||
// , { field: 'resid', title: '客户ID' }
|
||
// , { field: 'cname', title: '客户姓名' }
|
||
// , { field: 'deptname', title: '事业部', width: 80, }
|
||
// , { field: 'deptname', title: '销售组' }
|
||
// , { field: 'eid', title: '成交客服' }
|
||
// , { field: 'Channel', title: '内诉渠道', templet: '#channelTpl' }
|
||
// , { field: 'reasonStr', title: '投诉原因', templet: '#reasonTpl' }
|
||
// , { field: 'content', title: '投诉内容' }
|
||
// , { field: 'dueStatusStr', title: '到期状态' }
|
||
// , { field: 'businessDeadlineSpan', title: '剩余处理期限' }
|
||
// , { field: 'dueCount', title: '可延长期限次数' }
|
||
// , { field: 'inComplaintStatusStr', title: '内诉状态' }
|
||
// , { field: 'businessStatusStr', title: '业务处理状态' }
|
||
// , { field: 'orders', title: '已退订单号', width: 150, templet: '#ordersTpl' }
|
||
// , { field: 'prices', title: '已退金额', width: 150, templet: '#pricesTpl' }
|
||
// , { field: 'creator', title: '提交人' }
|
||
// , { field: 'createTime', title: '提交时间' }
|
||
// , { field: 'creator', title: '回复人' }
|
||
// , { field: 'createTime', title: '回复时间' }
|
||
// ]], where: $("#myform").serializeFormJSON()
|
||
//});
|
||
|
||
//监听行单击事件
|
||
table.on('row(tabl1)', function (obj) {
|
||
var data = obj.data;
|
||
//标注选中样式
|
||
console.log(data);
|
||
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
selectRow = data;
|
||
});
|
||
|
||
var active = {
|
||
other1: function () {
|
||
if (selectRow.id == "undefined" || selectRow.id == null) {
|
||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
console.log("selectRow.restoreCount===" + selectRow.restoreCount);
|
||
|
||
//if (selectRow.restoreCount != "undefined" && selectRow.restoreCount != null && selectRow.restoreCount > 0) {
|
||
// layer.msg("已经处理回复,无需再回复!", { icon: 7 });
|
||
// return;
|
||
//}
|
||
|
||
if (selectRow.businessStatus != "undefined" && selectRow.businessStatus != null && selectRow.businessStatus == 2) {
|
||
layer.msg("到期未处理内诉,无法处理回复!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
winindex = layer.open({
|
||
type: 2,
|
||
title: "编辑",
|
||
content: '/InComplaint/Edit?id=' + selectRow.id,
|
||
area: ['650px', '600px']
|
||
});
|
||
},
|
||
other2: function () {
|
||
if (selectRow.id == "undefined" || selectRow.id == null) {
|
||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
if (selectRow.restoreCount == "undefined" || selectRow.restoreCount == null || selectRow.restoreCount == 0) {
|
||
layer.msg("无回复内容可查看,请先处理回复!", { icon: 7 });
|
||
return;
|
||
}
|
||
winindex = layer.open({
|
||
type: 2,
|
||
title: "详情",
|
||
content: '/InComplaint/Detail?id=' + selectRow.id,
|
||
area: ['650px', '600px']
|
||
});
|
||
},
|
||
other3: function () {
|
||
if (selectRow.id == "undefined" || selectRow.id == null) {
|
||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
if (selectRow.businessStatus != "undefined" && selectRow.businessStatus != null && selectRow.businessStatus == 2) {
|
||
layer.msg("到期未处理的内诉,无法延长处理期限!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
if (selectRow.restoreCount != "undefined" && selectRow.restoreCount != null && selectRow.restoreCount > 0) {
|
||
layer.msg("已经处理回复,无需再延长期限!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
if (selectRow.dueCount != "undefined" && selectRow.dueCount != null && selectRow.dueCount < 1) {
|
||
layer.msg("延长期限次数已用完,无法再延长!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
if (selectRow.isAdjustDeadline != "undefined" && selectRow.isAdjustDeadline != null && selectRow.isAdjustDeadline == true) {
|
||
layer.msg("已经调整过期限,无法再延长!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
layer.confirm('是否确认延长72小时处理期限?', {
|
||
offset: '200px'
|
||
}, function (index) {
|
||
$.ajax({
|
||
type: "GET",
|
||
url: "ProLong?id=" + selectRow.id,
|
||
dataType: "json",
|
||
contentType: "application/json",
|
||
success: function (da) {
|
||
if (da.result == true) {
|
||
layer.msg('操作成功!', { icon: 1 });
|
||
TableReload();
|
||
} else {
|
||
layer.msg(da.retmsg, { icon: 2 });
|
||
}
|
||
},
|
||
error: function () {
|
||
layer.msg('操作失败!', { icon: 2 });
|
||
}
|
||
});
|
||
layer.close(index);
|
||
});
|
||
},
|
||
other4: function () {
|
||
if (selectRow.id == "undefined" || selectRow.id == null) {
|
||
layer.msg("请先选中一条记录!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
if (selectRow.businessStatus != "undefined" && selectRow.businessStatus != null && selectRow.businessStatus == 2) {
|
||
layer.msg("到期未处理的内诉,无法调整期限!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
if (selectRow.isAdjustDeadline != "undefined" && selectRow.isAdjustDeadline != null && selectRow.isAdjustDeadline == true) {
|
||
layer.msg("已经调整过期限,无法再延长!", { icon: 7 });
|
||
return;
|
||
}
|
||
|
||
winindex = layer.open({
|
||
type: 2,
|
||
title: "调整期限",
|
||
content: '/InComplaint/Adjust?id=' + selectRow.id,
|
||
area: ['425px', '216px']
|
||
});
|
||
}, other5: function () {
|
||
var param = $("#myform").serializeFormJSON();
|
||
console.log("param===");
|
||
console.log(param);
|
||
|
||
var queryString = "";
|
||
for (var key in param) {
|
||
if (queryString != "") queryString += "&";
|
||
queryString += key + "=" + encodeURIComponent(param[key]);
|
||
}
|
||
console.log("queryString===");
|
||
console.log(queryString);
|
||
|
||
|
||
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/WeiXin/InComplaint/Export?" + queryString)));
|
||
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
||
|
||
},
|
||
search: function () {
|
||
var param = $("#myform").serializeFormJSON();
|
||
table.reload('listReload', {
|
||
where: param,
|
||
page: {
|
||
curr: 1
|
||
}
|
||
});
|
||
}
|
||
};
|
||
$('.layui-btn').on('click', function () {
|
||
var othis = $(this), method = othis.data('method');
|
||
console.log(method);
|
||
active[method] ? active[method].call(this, othis) : '';
|
||
|
||
});
|
||
});
|
||
|
||
|
||
|
||
function Closed() {
|
||
layer.close(winindex);
|
||
}
|
||
function TableReload() {
|
||
selectRow = {};
|
||
table.reload('listReload', {
|
||
|
||
});
|
||
}
|
||
|
||
function onLoadSucced() {
|
||
|
||
}
|
||
|
||
function GetIframeHtml(src) {
|
||
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
||
}
|
||
|
||
function getDataGridHeader() {
|
||
var newcolumns = [];
|
||
var columns = tableCols[0];
|
||
for (var i = 0; i < columns.length; i++) {
|
||
if (columns[i].field != "id" && columns[i].field != "Operator") {
|
||
newcolumns.push(columns[i])
|
||
};
|
||
}
|
||
return newcolumns;
|
||
}
|
||
|
||
</script>
|
||
|
||
|
||
<script type="text/html" id="channelTpl">
|
||
{{# for(var i=0;i<d.inComplaintChannelList.length;i++) { }}
|
||
<span>{{d.inComplaintChannelList[i]}}</span>
|
||
<br />
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="reasonTpl">
|
||
{{# for(var i=0;i<d.reasonList.length;i++) { }}
|
||
<span>{{d.reasonList[i]}}</span>
|
||
<br />
|
||
{{# } }}
|
||
</script>
|
||
|
||
<script type="text/html" id="ordersTpl">
|
||
{{# for(var i=0;i<d.orderList.length;i++) { }}
|
||
<span>{{d.orderList[i]}}</span>
|
||
<br />
|
||
{{# } }}
|
||
</script>
|
||
|
||
<script type="text/html" id="pricesTpl">
|
||
{{# for(var i=0;i<d.priceList.length;i++) { }}
|
||
<span>{{d.priceList[i]}}</span>
|
||
<br />
|
||
{{# } }}
|
||
</script>
|
||
|
||
<script type="text/html" id="resIdTpl">
|
||
<span><a href="javascript:parent.parent.ChildAddTab('客户详细', '/Csvr/CustomerInfo/CustomerDetail?resid={{d.resid}}', '')">{{d.resid}}</a></span>
|
||
</script> |