From 806d2c7874dfee7a1809e8441c0938801934f342 Mon Sep 17 00:00:00 2001 From: dshclm <3321914460@qq.com> Date: Tue, 12 Nov 2024 19:36:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B8=82=E5=B7=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/system/carrier/add.html | 20 +++--- .../templates/system/carrier/carrier.html | 12 ++-- .../templates/system/carrier/detail.html | 4 +- .../templates/system/carrier/edit.html | 10 +-- .../templates/system/carrierIssued/add.html | 66 +++++++++---------- .../system/carrierIssued/carrierIssued.html | 2 +- .../system/carrierIssued/detail.html | 6 +- .../templates/system/carrierIssued/edit.html | 4 +- .../resources/templates/system/check/add.html | 2 +- .../system/check/checknum/checknum.html | 2 +- .../templates/system/check/detail.html | 2 +- .../templates/system/check/edit.html | 2 +- .../templates/system/checkReport/add.html | 6 +- .../system/checkReport/checkReport.html | 2 +- .../templates/system/checkReport/detail.html | 2 +- .../templates/system/checkReport/edit.html | 4 +- .../system/checkresult/checkresultprint.html | 2 +- .../templates/system/checkresult/docheck.html | 2 +- .../resources/templates/system/dept/add.html | 10 +-- .../resources/templates/system/dept/edit.html | 8 +-- .../system/destoryCarrier/destoryCarrier.html | 2 +- .../templates/system/destoryCarrier/edit.html | 2 +- .../system/destoryIssued/destoryIssued.html | 2 +- .../templates/system/filedestory/detail.html | 2 +- .../templates/system/fileprovide/add.html | 2 +- .../templates/system/fileprovide/detail.html | 2 +- .../system/fileprovide/filenum/filenum.html | 2 +- .../system/fileprovide/filenum/print.html | 2 +- .../fileprovide/filenum/printIssued.html | 2 +- .../system/fileprovide/fileprovide.html | 4 +- .../system/maintainCarrier/edit.html | 2 +- .../maintainCarrier/maintainCarrier.html | 2 +- .../system/maintainIssued/maintainIssued.html | 2 +- .../templates/system/network/network/add.html | 6 +- .../system/network/network/edit.html | 2 +- .../system/network/network/network.html | 2 +- .../system/network/networknum/print.html | 2 +- .../templates/system/notify/add.html | 2 +- .../templates/system/notify/edit.html | 2 +- .../system/property/property/add.html | 6 +- .../system/property/property/edit.html | 4 +- .../system/property/property/property.html | 2 +- .../propertychange/list/property.html | 2 +- .../propertydestory/list/property.html | 2 +- .../templates/system/recCarrier/edit.html | 2 +- .../system/recCarrier/recCarrier.html | 2 +- .../templates/system/saveCarrier/edit.html | 2 +- .../system/saveCarrier/saveCarrier.html | 2 +- .../system/saveIssued/saveIssued.html | 2 +- .../resources/templates/system/train/add.html | 6 +- .../templates/system/train/detail.html | 2 +- .../templates/system/train/edit.html | 4 +- .../templates/system/train/examine.html | 2 +- .../templates/system/train/train.html | 6 +- .../templates/system/trainnum/detail.html | 2 +- .../templates/system/trainnum/trainnum.html | 4 +- .../templates/system/useCarrier/edit.html | 2 +- .../system/useCarrier/useCarrier.html | 2 +- .../templates/system/useIssued/edit.html | 2 +- .../templates/system/useIssued/useIssued.html | 2 +- .../templates/system/usernum/print.html | 2 +- 61 files changed, 134 insertions(+), 140 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/system/carrier/add.html b/ruoyi-admin/src/main/resources/templates/system/carrier/add.html index af10a3a1..d2b80d56 100644 --- a/ruoyi-admin/src/main/resources/templates/system/carrier/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/carrier/add.html @@ -13,7 +13,7 @@
- +
@@ -887,7 +887,7 @@ type: 'GET', data:this.params , success:((res)=>{ - this.CityList = res.data + this.CityList = res.data.filter(obj => obj.id === '36625'); }) , }); }, diff --git a/ruoyi-admin/src/main/resources/templates/system/carrier/edit.html b/ruoyi-admin/src/main/resources/templates/system/carrier/edit.html index 1dc68335..8da39c37 100644 --- a/ruoyi-admin/src/main/resources/templates/system/carrier/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/carrier/edit.html @@ -13,7 +13,7 @@
- +
@@ -130,7 +130,7 @@ url: ctx + "system/area/getSysAreaList", method: 'GET', success: function(res) { - var cities = res.data; // 假设返回的数据中有一个叫做 'cities' 的字段包含市级数据 + var cities = res.data.filter(obj => obj.id === '36625'); // 假设返回的数据中有一个叫做 'cities' 的字段包含市级数据 var $citySelect = $('#City'); // 填充城市下拉框 @@ -140,7 +140,7 @@ text: city.name })); }); - + $citySelect.val('36625'); // 初始化 select2 插件 $citySelect.select2(); }, @@ -150,42 +150,42 @@ }); // 监听城市下拉框的变化事件 - $('#City').on('change', function() { - var selectedCityId = $(this).val(); + // $('#City').on('change', function() { + // var selectedCityId = $(this).val(); + // + // // 如果未选择城市,则不执行后续操作 + // if (!selectedCityId) return; - // 如果未选择城市,则不执行后续操作 - if (!selectedCityId) return; + // 根据选中的城市ID发送请求获取对应的区级数据 + $.ajax({ + url: ctx + "system/area/getSysAreaList", + data:{parentId:'36625'}, + method: 'GET', + success: function(res) { + var areas = res.data; // 假设返回的数据中有一个叫做 'areas' 的字段包含区级数据 + var $areaSelect = $('#Area'); - // 根据选中的城市ID发送请求获取对应的区级数据 - $.ajax({ - url: ctx + "system/area/getSysAreaList", - data:{parentId:selectedCityId}, - method: 'GET', - success: function(res) { - var areas = res.data; // 假设返回的数据中有一个叫做 'areas' 的字段包含区级数据 - var $areaSelect = $('#Area'); + // 清空区级下拉框并填充数据 + $areaSelect.empty().append($('