提交 6d777ca6 编写于 作者: doc_wei's avatar doc_wei

update: 售后服务工单信息反馈托管到表单布局

上级 207d24b6
var objectKey = "";
var objectId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'table'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
objectKey = GetUrlParam("objectKey");
objectId = GetUrlParam("objectId");
if (isNull(objectKey) || isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false;
}
var state;
AjaxPostUtil.request({url: sysMainMation.sealServiceBasePath + "querySealServiceOrderById", params: {id: objectId}, type: 'json', method: 'GET', callback: function(json) {
state = json.bean.state;
if (state != 'beCompleted' && state != 'beEvaluated') {
$("#addBean").hide();
}
initTable();
}});
function initTable() {
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.sealServiceBasePath + 'queryFeedBackList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'typeId', title: '反馈类型', width: 200, align: 'left', templet: function (d) {
return sysDictDataUtil.getDictDataNameByCodeAndKey(sysDictData["amsServiceFeedbBackType"]["key"], d.typeId);
}},
{ field: 'content', title: '反馈内容', align: 'left', width: 300 },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 120, templet: function (d) {
var str = '';
if (state == 'beCompleted' || state == 'beEvaluated') {
str += '<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>';
str += '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>';
}
return str;
}}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "暂不支持搜索", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'del'){ //删除
del(data, obj);
}
});
}
// 添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2023091000006&objectId=' + objectId + '&objectKey=' + objectKey, null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "feedBackAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 编辑
function edit(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2023091000007&objectId=' + objectId + '&objectKey=' + objectKey + '&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "feedBackEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}
});
}
// 删除
function del(data, obj) {
layer.confirm('确认删除选中数据吗?', {icon: 3, title: '删除操作'}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.sealServiceBasePath + "deleteFeedBackById", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {objectKey: objectKey, objectId: objectId}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('feedBackList', {});
});
// 工单反馈
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function(exports) {
winui.renderColor();
layui.use(['form'], function(form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
var customerId = "",//客户id
productId = "";//商品id
AjaxPostUtil.request({url: flowableBasePath + "feedback002", params: {serviceId: parent.serviceId}, type: 'json', callback: function(json) {
$("#orderNum").html(json.bean.orderNum);
$("#customerName").html(json.bean.customerName);
$("#productName").html(json.bean.productName);
productId = json.bean.productId;
customerId = json.bean.customerId;
// 售后服务反馈类型
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["amsServiceFeedbBackType"]["key"], 'select', "typeId", '', form);
matchingLanguage();
}});
skyeyeEnclosure.init('enclosureUpload');
form.on('submit(formAddBean)', function(data) {
if(winui.verifyForm(data.elem)) {
var params = {
typeId: $("#typeId").val(),
content: $("#content").val(),
customId: customerId,
proId: productId,
serviceId: parent.serviceId,
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
};
AjaxPostUtil.request({url: flowableBasePath + "feedback003", params: params, type: 'json', callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function(exports) {
winui.renderColor();
layui.use(['form'], function(form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
AjaxPostUtil.request({url: flowableBasePath + "feedback002", params: {serviceId: parent.serviceId}, type: 'json', callback: function(json) {
$("#orderNum").html(json.bean.orderNum);
$("#customerName").html(json.bean.customerName);
$("#productName").html(json.bean.productName);
// 获取反馈信息
AjaxPostUtil.request({url: flowableBasePath + "feedback007", params: {rowId: parent.rowId}, type: 'json', callback: function(j) {
$("#createName").html(j.bean.createName);
$("#typeName").html(j.bean.typeName);
$("#content").html(j.bean.content);
// 附件回显
skyeyeEnclosure.showDetails({"enclosureUploadBox": j.bean.enclosureInfo});
}});
matchingLanguage();
}});
});
});
\ No newline at end of file
// 工单反馈
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function(exports) {
winui.renderColor();
layui.use(['form'], function(form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
AjaxPostUtil.request({url: flowableBasePath + "feedback002", params: {serviceId: parent.serviceId}, type: 'json', callback: function(json) {
$("#orderNum").html(json.bean.orderNum);
$("#customerName").html(json.bean.customerName);
$("#productName").html(json.bean.productName);
// 售后服务反馈类型
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["amsServiceFeedbBackType"]["key"], 'select', "typeId", '', form);
// 获取反馈信息
AjaxPostUtil.request({url: flowableBasePath + "feedback004", params: {rowId: parent.rowId}, type: 'json', callback: function(j) {
$("#typeId").val(j.bean.typeId);
$("#content").val(j.bean.content);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function(data) {
if(winui.verifyForm(data.elem)) {
var params = {
typeId: $("#typeId").val(),
content: $("#content").val(),
rowId: parent.rowId,
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
};
AjaxPostUtil.request({url: flowableBasePath + "feedback005", params: params, type: 'json', callback: function(json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}});
}});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
});
\ No newline at end of file
var rowId = "";
var serviceId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'table'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
table = layui.table;
serviceId = parent.rowId;
showGrid({
id: "showForm",
url: flowableBasePath + "sealseservice039",
params: {rowId: serviceId},
pagination: false,
template: $("#beanTemplate").html(),
ajaxSendAfter: function (json) {
//待完工或者待评价的工单可以进行反馈操作
if(json.bean.state != 4 && json.bean.state != 5){
$("#addBean").remove();
}
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'feedback001',
where: {serviceId: serviceId},
even: true,
page: true,
limits: [8, 16, 24, 32, 40, 48, 56],
limit: 8,
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'typeName', title: '反馈类型', align: 'left', width: 120},
{ field: 'createName', title: '反馈人', align: 'left', width: 80 },
{ field: 'createTime', title: systemLanguage["com.skyeye.entryTime"][languageType], align: 'center', width: 140 },
{ field: 'content', title: '反馈内容', align: 'left', width: 300 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'delete'){ //删除
deleteRow(data);
} else if (layEvent === 'details'){ //详情
details(data);
}
});
matchingLanguage();
form.render();
}
});
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: {serviceId: serviceId}});
}
//新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/feedback/feedbackadd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "feedbackadd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
//编辑
function edit(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/feedback/feedbackedit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "feedbackedit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//删除
function deleteRow(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "feedback006", params: {rowId: data.id}, type: 'json', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
//详情
function details(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/feedback/feedbackdetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "feedbackdetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
});
});
\ No newline at end of file
......@@ -27,6 +27,9 @@ layui.config({
}, {
title: '服务评价',
pageUrl: '../../tpl/sealEvaluate/sealEvaluateList.html'
}, {
title: '信息反馈',
pageUrl: '../../tpl/feedBack/feedBackList.html'
}],
element: layui.element,
object: {
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-tip alert-info" id="showInfo">
只有待完工/待评价的工单才可以进行信息反馈操作。
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="add"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/feedBack/'}).use('feedBackList');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin: 0 auto; padding: 20px;">
<form class="layui-form" action="" id="showForm">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">工单号:</label>
<div class="layui-input-block ver-center" id="orderNum">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户名称:</label>
<div class="layui-input-block ver-center" id="customerName">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">商品名称:</label>
<div class="layui-input-block ver-center" id="productName">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">反馈类型<i class="red">*</i></label>
<div class="layui-input-block">
<select id="typeId" name="typeId" win-verify="required" lay-search></select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">反馈内容<i class="red">*</i></label>
<div class="layui-input-block">
<textarea id="content" name="content" win-verify="required" placeholder="请输入反馈内容" class="layui-textarea" style="height: 100px;"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关附件</label>
<div class="layui-input-block" id="enclosureUpload">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/feedback/'}).use('feedbackadd');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin: 0 auto; padding: 20px;">
<form class="layui-form" action="" id="showForm">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">工单号:</label>
<div class="layui-input-block ver-center" id="orderNum">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户名称:</label>
<div class="layui-input-block ver-center" id="customerName">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">商品名称:</label>
<div class="layui-input-block ver-center" id="productName">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">反馈类型:</label>
<div class="layui-input-block ver-center" id="typeName">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">反馈人:</label>
<div class="layui-input-block ver-center" id="createName">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">反馈内容:</label>
<div class="layui-input-block ver-center" id="content">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关附件:</label>
<div class="layui-input-block ver-center" id="enclosureUploadBox">
</div>
</div>
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/feedback/'}).use('feedbackdetails');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin: 0 auto; padding: 20px;">
<form class="layui-form" action="" id="showForm">
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">工单号:</label>
<div class="layui-input-block ver-center" id="orderNum">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户名称:</label>
<div class="layui-input-block ver-center" id="customerName">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">商品名称:</label>
<div class="layui-input-block ver-center" id="productName">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">反馈类型<i class="red">*</i></label>
<div class="layui-input-block">
<select id="typeId" name="typeId" win-verify="required" lay-search></select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">反馈内容<i class="red">*</i></label>
<div class="layui-input-block">
<textarea id="content" name="content" win-verify="required" placeholder="请输入反馈内容" class="layui-textarea" style="height: 100px;"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">相关附件</label>
<div class="layui-input-block" id="enclosureUpload">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formEditBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/feedback/'}).use('feedbackedit');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:0 auto;padding-top:10px;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="details">详情</a>
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
</script>
</div>
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">工单号</label>
<div class="layui-input-block ver-center">
{{orderNum}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">服务类型</label>
<div class="layui-input-block ver-center">
{{serviceTypeName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">派工时间</label>
<div class="layui-input-block ver-center">
{{declarationTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">联系人</label>
<div class="layui-input-block ver-center">
{{contacts}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">联系电话</label>
<div class="layui-input-block ver-center">
{{phone}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">邮箱</label>
<div class="layui-input-block ver-center">
{{email}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">QQ</label>
<div class="layui-input-block ver-center">
{{qq}}
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/feedback/'}).use('feedbacklist');
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册