From 43b91c70e7ceb5ca69c020b8ea37450566b16e07 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sun, 10 Jul 2022 16:44:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90AMS=E3=80=91=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=94=AE=E5=90=8E=E6=9C=8D=E5=8A=A1=E5=8F=8D=E9=A6=88=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/js/feedback/feedbackadd.js | 17 +-- .../template/js/feedback/feedbackedit.js | 63 ++++---- .../template/js/feedback/feedbacklist.js | 12 +- .../js/feedbacktype/feedbacktypeadd.js | 32 ---- .../js/feedbacktype/feedbacktypeedit.js | 44 ------ .../js/feedbacktype/feedbacktypelist.js | 143 ------------------ .../tpl/feedbacktype/feedbacktypeadd.html | 32 ---- .../tpl/feedbacktype/feedbacktypeedit.html | 21 --- .../feedbacktype/feedbacktypeeditTemplate.tpl | 14 -- .../tpl/feedbacktype/feedbacktypelist.html | 70 --------- .../resources/template/json/sysDictData.json | 3 +- 11 files changed, 40 insertions(+), 411 deletions(-) delete mode 100644 seal-service/src/main/resources/template/js/feedbacktype/feedbacktypeadd.js delete mode 100644 seal-service/src/main/resources/template/js/feedbacktype/feedbacktypeedit.js delete mode 100644 seal-service/src/main/resources/template/js/feedbacktype/feedbacktypelist.js delete mode 100644 seal-service/src/main/resources/template/tpl/feedbacktype/feedbacktypeadd.html delete mode 100644 seal-service/src/main/resources/template/tpl/feedbacktype/feedbacktypeedit.html delete mode 100644 seal-service/src/main/resources/template/tpl/feedbacktype/feedbacktypeeditTemplate.tpl delete mode 100644 seal-service/src/main/resources/template/tpl/feedbacktype/feedbacktypelist.html diff --git a/seal-service/src/main/resources/template/js/feedback/feedbackadd.js b/seal-service/src/main/resources/template/js/feedback/feedbackadd.js index e23913d3d..8e82e26ba 100644 --- a/seal-service/src/main/resources/template/js/feedback/feedbackadd.js +++ b/seal-service/src/main/resources/template/js/feedback/feedbackadd.js @@ -10,7 +10,6 @@ layui.config({ layui.use(['form'], function(form) { var index = parent.layer.getFrameIndex(window.name); var $ = layui.$; - var customerId = "",//客户id productId = "";//产品id @@ -20,18 +19,10 @@ layui.config({ $("#productName").html(json.bean.productName); productId = json.bean.productId; customerId = json.bean.customerId; - showGrid({ - id: "typeId", - url: flowableBasePath + "crmservicefeedbacktype008", - params: {}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function(data){ - form.render("select"); - } - }); + + // 售后服务反馈类型 + sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["amsServiceFeedbBackType"]["key"], 'select', "typeId", '', form); + matchingLanguage(); }}); diff --git a/seal-service/src/main/resources/template/js/feedback/feedbackedit.js b/seal-service/src/main/resources/template/js/feedback/feedbackedit.js index 62a8c0fa0..5f85f1843 100644 --- a/seal-service/src/main/resources/template/js/feedback/feedbackedit.js +++ b/seal-service/src/main/resources/template/js/feedback/feedbackedit.js @@ -16,43 +16,34 @@ layui.config({ $("#customerName").html(json.bean.customerName); $("#productName").html(json.bean.productName); - showGrid({ - id: "typeId", - url: flowableBasePath + "crmservicefeedbacktype008", - params: {}, - pagination: false, - template: getFileContent('tpl/template/select-option.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter:function(data){ - form.render("select"); - //获取反馈信息 - 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}); + // 售后服务反馈类型 + sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["amsServiceFeedbBackType"]["key"], 'select', "typeId", '', form); - 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; - }); - }}); - } - }); + // 获取反馈信息 + 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() { diff --git a/seal-service/src/main/resources/template/js/feedback/feedbacklist.js b/seal-service/src/main/resources/template/js/feedback/feedbacklist.js index 4e121e7ad..adeed8f4c 100644 --- a/seal-service/src/main/resources/template/js/feedback/feedbacklist.js +++ b/seal-service/src/main/resources/template/js/feedback/feedbacklist.js @@ -23,9 +23,6 @@ layui.config({ pagination: false, template: $("#beanTemplate").html(), ajaxSendAfter: function (json) { - matchingLanguage(); - form.render(); - //待完工或者待评价的工单可以进行反馈操作 if(json.bean.state != 4 && json.bean.state != 5){ $("#addBean").remove(); @@ -49,7 +46,10 @@ layui.config({ { 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(){ + matchingLanguage(); + } }); table.on('tool(messageTable)', function (obj) { @@ -63,7 +63,9 @@ layui.config({ details(data); } }); - + + matchingLanguage(); + form.render(); } }); diff --git a/seal-service/src/main/resources/template/js/feedbacktype/feedbacktypeadd.js b/seal-service/src/main/resources/template/js/feedbacktype/feedbacktypeadd.js deleted file mode 100644 index 00713a0d9..000000000 --- a/seal-service/src/main/resources/template/js/feedbacktype/feedbacktypeadd.js +++ /dev/null @@ -1,32 +0,0 @@ - -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.$; - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - typeName: $("#typeName").val() - }; - AjaxPostUtil.request({url: flowableBasePath + "crmservicefeedbacktype002", 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 diff --git a/seal-service/src/main/resources/template/js/feedbacktype/feedbacktypeedit.js b/seal-service/src/main/resources/template/js/feedbacktype/feedbacktypeedit.js deleted file mode 100644 index d218c9813..000000000 --- a/seal-service/src/main/resources/template/js/feedbacktype/feedbacktypeedit.js +++ /dev/null @@ -1,44 +0,0 @@ - -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.$; - - showGrid({ - id: "showForm", - url: flowableBasePath + "crmservicefeedbacktype003", - params: {rowId: parent.rowId}, - pagination: false, - template: getFileContent('tpl/feedbacktype/feedbacktypeeditTemplate.tpl'), - ajaxSendLoadBefore: function(hdb){ - }, - ajaxSendAfter: function (json) { - matchingLanguage(); - form.render(); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - rowId: parent.rowId, - typeName: $("#typeName").val() - }; - AjaxPostUtil.request({url: flowableBasePath + "crmservicefeedbacktype004", 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 diff --git a/seal-service/src/main/resources/template/js/feedbacktype/feedbacktypelist.js b/seal-service/src/main/resources/template/js/feedbacktype/feedbacktypelist.js deleted file mode 100644 index 366045a21..000000000 --- a/seal-service/src/main/resources/template/js/feedbacktype/feedbacktypelist.js +++ /dev/null @@ -1,143 +0,0 @@ -var rowId = ""; -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { - winui.renderColor(); - - var $ = layui.$, - form = layui.form, - table = layui.table; - - authBtn('1578750491093'); - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: flowableBasePath + 'crmservicefeedbacktype001', - where: {typeName: $("#typeName").val(), state: $("#state").val()}, - 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: 'center', width: 120 }, - { field: 'state', title: '状态', width: 100, align: 'center', templet: function (d) { - if(d.state == '1'){ - return "新建"; - }else if(d.state == '2'){ - return "上线"; - }else if(d.state == '3'){ - return "下线"; - } else { - return "参数错误"; - } - }}, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 200}, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 250, toolbar: '#tableBar'} - ]], - done: function(){ - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - edit(data); - }else if (layEvent === 'delete'){ //删除 - del(data); - }else if (layEvent === 'up') { //上线 - up(data); - }else if (layEvent === 'down') { //下线 - down(data); - } - }); - - form.render(); - - - $("body").on("click", "#formSearch", function() { - refreshTable(); - }); - - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - function loadTable(){ - table.reload("messageTable", {where: {typeName: $("#typeName").val(), state: $("#state").val()}}); - } - - function refreshTable(){ - table.reload("messageTable", {page: {curr: 1}, where: {typeName: $("#typeName").val(), state: $("#state").val()}}); - } - - //新增 - $("body").on("click", "#addBean", function() { - _openNewWindows({ - url: "../../tpl/feedbacktype/feedbacktypeadd.html", - title: systemLanguage["com.skyeye.addPageTitle"][languageType], - pageId: "feedbacktypeadd", - 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/feedbacktype/feedbacktypeedit.html", - title: systemLanguage["com.skyeye.editPageTitle"][languageType], - pageId: "feedbacktypeedit", - 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(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){ - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "crmservicefeedbacktype005", params: {rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - //上线 - function up(data, obj){ - var msg = obj ? '确认将【' + obj.data.typeName + '】上线吗?' : '确认将选中数据上线吗?'; - layer.confirm(msg, {icon: 3, title: '上线操作'}, function (index) { - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "crmservicefeedbacktype006", params: {rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg("上线成功", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - //下线 - function down(data, obj){ - var msg = obj ? '确认将【' + obj.data.typeName + '】下线吗?' : '确认将选中数据下线吗?'; - layer.confirm(msg, {icon: 3, title: '下线操作'}, function (index) { - layer.close(index); - AjaxPostUtil.request({url: flowableBasePath + "crmservicefeedbacktype007", params: {rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg("下线成功", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - exports('feedbacktypelist', {}); -}); \ No newline at end of file diff --git a/seal-service/src/main/resources/template/tpl/feedbacktype/feedbacktypeadd.html b/seal-service/src/main/resources/template/tpl/feedbacktype/feedbacktypeadd.html deleted file mode 100644 index a7184e08b..000000000 --- a/seal-service/src/main/resources/template/tpl/feedbacktype/feedbacktypeadd.html +++ /dev/null @@ -1,32 +0,0 @@ - - -
- -