From 57049b184203cfcba22f70be9ea77b299ccce983 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Sun, 2 Jul 2023 13:05:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E7=BB=B4=E4=BF=AE=E4=BF=9D?= =?UTF-8?q?=E5=85=BB=E6=89=98=E7=AE=A1=E5=88=B0=E8=A1=A8=E5=8D=95=E5=B8=83?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vehicleManageMaintenanceAdd.js | 59 -------- .../vehicleManageMaintenanceDetails.js | 29 ---- .../vehicleManageMaintenanceEdit.js | 60 -------- .../vehicleManageMaintenanceList.js | 139 ------------------ .../vehicleManageMaintenanceAdd.html | 82 ----------- .../vehicleManageMaintenanceDetails.html | 21 --- ...ehicleManageMaintenanceDetailsTemplate.tpl | 55 ------- .../vehicleManageMaintenanceEdit.html | 21 --- .../vehicleManageMaintenanceEditTemplate.tpl | 62 -------- .../vehicleManageMaintenanceList.html | 56 ------- .../lib/layui/customer/adminAssistantUtil.js | 13 -- .../template/json/skyeyeClassEnum.json | 3 +- 12 files changed, 2 insertions(+), 598 deletions(-) delete mode 100644 admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceAdd.js delete mode 100644 admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceDetails.js delete mode 100644 admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceEdit.js delete mode 100644 admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceList.js delete mode 100644 admin-assistant/src/main/resources/template/tpl/vehicleManageMaintenance/vehicleManageMaintenanceAdd.html delete mode 100644 admin-assistant/src/main/resources/template/tpl/vehicleManageMaintenance/vehicleManageMaintenanceDetails.html delete mode 100644 admin-assistant/src/main/resources/template/tpl/vehicleManageMaintenance/vehicleManageMaintenanceDetailsTemplate.tpl delete mode 100644 admin-assistant/src/main/resources/template/tpl/vehicleManageMaintenance/vehicleManageMaintenanceEdit.html delete mode 100644 admin-assistant/src/main/resources/template/tpl/vehicleManageMaintenance/vehicleManageMaintenanceEditTemplate.tpl delete mode 100644 admin-assistant/src/main/resources/template/tpl/vehicleManageMaintenance/vehicleManageMaintenanceList.html diff --git a/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceAdd.js b/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceAdd.js deleted file mode 100644 index d66e39e69..000000000 --- a/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceAdd.js +++ /dev/null @@ -1,59 +0,0 @@ - -// 车辆维修保养 -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'fileUpload', 'tagEditor', 'laydate'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - laydate = layui.laydate; - - skyeyeEnclosure.init('enclosureUpload'); - // 获取当前登录员工信息 - systemCommonUtil.getSysCurrentLoginUserMation(function (data) { - var userName = data.bean.userName; - $("#maintenanceTitle").html("车辆维修保养登记单-" + userName + "-" + (new Date()).getTime()) + Math.floor(Math.random()*100); - }); - - // 查询所有的车牌号用于下拉选择框 - adminAssistantUtil.queryAllVehicleList(function (data) { - $("#licensePlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data)); - form.render('select'); - }); - - // 维修保养时间段选择 - laydate.render({elem: '#maintenanceTime', type: 'date', range: true, trigger: 'click'}); - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - maintenanceTitle: $("#maintenanceTitle").html(), - maintenanceCompany: $("#maintenanceCompany").val(), - maintenancePrice: $("#maintenancePrice").val(), - startTime: $("#maintenanceTime").val().split(" - ")[0], - endTime: $("#maintenanceTime").val().split(" - ")[1], - concreteContent: $("#concreteContent").val(), - roomAddDesc: $("#roomAddDesc").val(), - vehicleId: $("#licensePlate").val(), - maintenanceType: $("input[name='maintenanceType']:checked").val(), - enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') - }; - AjaxPostUtil.request({url: flowableBasePath + "maintenance002", 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/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceDetails.js b/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceDetails.js deleted file mode 100644 index eed247d3c..000000000 --- a/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceDetails.js +++ /dev/null @@ -1,29 +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 + "maintenance006", - params: {rowId:parent.rowId}, - pagination: false, - template: getFileContent('tpl/vehicleManageMaintenance/vehicleManageMaintenanceDetailsTemplate.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function (json) { - // 附件回显 - skyeyeEnclosure.showDetails({"enclosureUploadBtn": json.bean.enclosureInfo}); - matchingLanguage(); - } - }); - - }); -}); \ No newline at end of file diff --git a/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceEdit.js b/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceEdit.js deleted file mode 100644 index 990f2fa38..000000000 --- a/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceEdit.js +++ /dev/null @@ -1,60 +0,0 @@ - -// 车辆维修保养 -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'jquery', 'winui', 'fileUpload', 'tagEditor', 'laydate'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - laydate = layui.laydate; - - showGrid({ - id: "showForm", - url: flowableBasePath + "maintenance004", - params: {rowId:parent.rowId}, - pagination: false, - template: getFileContent('tpl/vehicleManageMaintenance/vehicleManageMaintenanceEditTemplate.tpl'), - ajaxSendLoadBefore: function(hdb) { - }, - ajaxSendAfter:function (json) { - // 维修保养时间段选择 - laydate.render({elem: '#maintenanceTime', type: 'date', range: true, trigger: 'click'}); - - $("input:radio[name=maintenanceType][value=" + json.bean.maintenanceType + "]").attr("checked", true); - // 附件回显 - skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo}); - - matchingLanguage(); - form.render(); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - rowId: parent.rowId, - maintenanceCompany: $("#maintenanceCompany").val(), - maintenancePrice: $("#maintenancePrice").val(), - startTime: $("#maintenanceTime").val().split(" - ")[0], - endTime: $("#maintenanceTime").val().split(" - ")[1], - concreteContent: $("#concreteContent").val(), - roomAddDesc: $("#roomAddDesc").val(), - maintenanceType: $("input[name='maintenanceType']:checked").val(), - enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload') - }; - AjaxPostUtil.request({url: flowableBasePath + "maintenance005", 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/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceList.js b/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceList.js deleted file mode 100644 index 9a389b6aa..000000000 --- a/admin-assistant/src/main/resources/template/js/vehicleManageMaintenance/vehicleManageMaintenanceList.js +++ /dev/null @@ -1,139 +0,0 @@ -var rowId = ""; - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) { - winui.renderColor(); - var $ = layui.$, - form = layui.form, - table = layui.table, - laydate = layui.laydate; - - // 新增车辆维修保养 - authBtn('1597478766486'); - - // 查询所有的车牌号用于下拉选择框 - adminAssistantUtil.queryAllVehicleList(function (data) { - $("#maintenancePlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), data)); - form.render('select'); - }); - - showMaintenanceList(); - // 维修保养管理 - function showMaintenanceList(){ - table.render({ - id: 'maintenanceTable', - elem: '#maintenanceTable', - method: 'post', - url: flowableBasePath + "maintenance001", - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, - { field: 'maintenanceTitle', title: '主题', align: 'left', width: 300, templet: function (d) { - return '' + d.maintenanceTitle + ''; - }}, - { field: 'licensePlate', title: '车牌号', align: 'center', width: 120 }, - { field: 'maintenanceType', title: '类型', align: 'center', width: 120 }, - { field: 'Time', title: '时间段', align: 'center', width: 300 }, - { field: 'maintenancePrice', title: '费用(元)', width: 150 }, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#maintenancetableBar'} - ]], - done: function(json) { - matchingLanguage(); - } - }); - } - - table.on('tool(maintenanceTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'maintenancedetails') { //详情 - maintenancedetails(data); - } else if (layEvent === 'maintenancedelet'){ //删除 - maintenancedelet(data); - } else if (layEvent === 'maintenanceedit'){ //编辑 - maintenanceedit(data); - } - }); - - form.render(); - - // 维修保养信息详情 - function maintenancedetails(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/vehicleManageMaintenance/vehicleManageMaintenanceDetails.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "vehicleManageMaintenanceDetails", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - }}); - } - - // 删除维修保养信息 - function maintenancedelet(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 + "maintenance003", params: {rowId: data.id}, type: 'json', callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadMaintenanceTable(); - }}); - }); - } - - // 登记维修保养信息 - $("body").on("click", "#addMaintenanceBean", function() { - _openNewWindows({ - url: "../../tpl/vehicleManageMaintenance/vehicleManageMaintenanceAdd.html", - title: "车辆维修保养登记单", - pageId: "vehicleManageMaintenanceAdd", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadMaintenanceTable(); - }}); - }); - - // 编辑维修保养信息 - function maintenanceedit(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/vehicleManageMaintenance/vehicleManageMaintenanceEdit.html", - title: "编辑车辆维修保养信息", - pageId: "vehicleManageMaintenanceEdit", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadMaintenanceTable(); - }}); - } - - // 搜索表单 - $("body").on("click", "#maintenanceformSearch", function() { - table.reloadData("maintenanceTable", {page: {curr: 1}, where: getTableParams()}); - }); - - $("body").on("click", "#reloadMaintenanceTable", function() { - loadMaintenanceTable(); - }); - - function loadMaintenanceTable(){ - table.reloadData("maintenanceTable", {where: getTableParams()}); - } - - function getTableParams() { - return { - maintenanceTitle: $("#maintenanceTitle").val(), - maintenancePlate: $("#maintenancePlate").val() - }; - } - - exports('vehicleManageMaintenanceList', {}); -}); diff --git a/admin-assistant/src/main/resources/template/tpl/vehicleManageMaintenance/vehicleManageMaintenanceAdd.html b/admin-assistant/src/main/resources/template/tpl/vehicleManageMaintenance/vehicleManageMaintenanceAdd.html deleted file mode 100644 index 0bfb7593c..000000000 --- a/admin-assistant/src/main/resources/template/tpl/vehicleManageMaintenance/vehicleManageMaintenanceAdd.html +++ /dev/null @@ -1,82 +0,0 @@ - - -
- -