From ea0aa56767979e9ee5c10a4d23f758a05fec578d Mon Sep 17 00:00:00 2001 From: Janie <109517022+Janie06@users.noreply.github.com> Date: Thu, 24 Nov 2022 13:00:41 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20=E5=B1=95=E9=A4=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=B8=AC=E8=A9=A6=E5=95=8F=E9=A1=8C=E4=BF=AE=E6=AD=A3=20[WHY]?= =?UTF-8?q?=20features=20[HOW]=20=E4=BE=9D=E7=85=A7=E5=B1=95=E9=A4=A8?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=B8=AC=E8=A9=A6=E6=96=87=E4=BB=B6=E9=80=B2?= =?UTF-8?q?=E8=A1=8C=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 展館管理: 1. 調整{} --- .../pages/ShowEasy/VenueMaintain_Upd.js | 93 +++++++++---------- 1 file changed, 45 insertions(+), 48 deletions(-) diff --git a/EuroTran/WebApp/Scripts/pages/ShowEasy/VenueMaintain_Upd.js b/EuroTran/WebApp/Scripts/pages/ShowEasy/VenueMaintain_Upd.js index 3968d00..5e108e1 100644 --- a/EuroTran/WebApp/Scripts/pages/ShowEasy/VenueMaintain_Upd.js +++ b/EuroTran/WebApp/Scripts/pages/ShowEasy/VenueMaintain_Upd.js @@ -124,12 +124,12 @@ var fnPageInit = function () { } }), - - //國家下拉選單 - fnSetCountryValueDrop = function (RegionID) { - return g_api.ConnectLite(canDo.ProgramId, "GetCountry", - { RegionID: $("#RegionID").val() }, //依據所選擇的洲別顯示相對應的國家選單 + + //國家下拉選單 + fnSetCountryValueDrop = function (RegionID) { + return g_api.ConnectLite(canDo.ProgramId, "GetCountry", + { RegionID: $("#RegionID").val() }, //依據所選擇的洲別顯示相對應的國家選單 function (res) { if (res.RESULT) { var saList = res.DATA.rel; @@ -142,60 +142,57 @@ var fnPageInit = function () { }); }, - //城市下拉選單 - fnSetCityValueDrop = function (CountryID) { - return g_api.ConnectLite(canDo.ProgramId, "GetCity", - { CountryID: $("#CountryID").val() }, //依據所選擇的國家顯示相對應的城市選單 - function (res) { - if (res.RESULT) { - var saList = res.DATA.rel; - $('#CityID').html(createOptions(saList, 'CityID', 'CityName', true)).on('change', function () { - if ($('#CityID').val()) { - fnSetOrderByValueDrop(); //若CityID改變,觸發OrderByValue選單 - } - }); - } - }); + //城市下拉選單 + fnSetCityValueDrop = function (CountryID) { + return g_api.ConnectLite(canDo.ProgramId, "GetCity", + { CountryID: $("#CountryID").val() }, //依據所選擇的國家顯示相對應的城市選單 + function (res) { + if (res.RESULT) { + var saList = res.DATA.rel; + $('#CityID').html(createOptions(saList, 'CityID', 'CityName', true)).on('change', function () { + if ($('#CityID').val()) { + fnSetOrderByValueDrop(); //若CityID改變,觸發OrderByValue選單 + } + }); + } + }); }, - //洲別下拉選單 - fnSetRegionValueDrop = function () { - return g_api.ConnectLite(canDo.ProgramId, "GetRegion", {}, - function (res) { - if (res.RESULT) { - var regionList = res.DATA.rel;; - $('#RegionID').html(createOptions(regionList, 'RegionID', 'RegionName', true)).on('change', function () { + //洲別下拉選單 + fnSetRegionValueDrop = function () { + return g_api.ConnectLite(canDo.ProgramId, "GetRegion", {}, + function (res) { + if (res.RESULT) { + var regionList = res.DATA.rel;; + $('#RegionID').html(createOptions(regionList, 'RegionID', 'RegionName', true)).on('change', function () { if ($('#RegionID').val()) { fnSetCountryValueDrop(); //若RegionID改變,觸發國家選單 } }); - } - }); + } + }); }, - fnSetOrderByValueDrop = function () { - return g_api.ConnectLite(canDo.ProgramId, canDo._api.getcout, { CityID: $("#CityID").val()}, - function (res) { - if (res.RESULT) { - - var iCount = res.DATA.rel; - if (canDo.action === 'add') { - iCount++; - console.log('排序'+iCount); - } - $('#OrderByValue').html(createOptions(iCount)); - if (canDo.action === 'add') { - $('#OrderByValue').val(iCount); - console.log('OrderByValue'+OrderByValue); - } - } - }); - }, - - + fnSetOrderByValueDrop = function () { + return g_api.ConnectLite(canDo.ProgramId, canDo._api.getcout, { CityID: $("#CityID").val() }, + function (res) { + if (res.RESULT) { + var iCount = res.DATA.rel; + if (canDo.action === 'add') { + iCount++; + console.log('排序' + iCount); + } + $('#OrderByValue').html(createOptions(iCount)); + if (canDo.action === 'add') { + $('#OrderByValue').val(iCount); + console.log('OrderByValue' + OrderByValue); + } + } + }); + }; }; require(['base', 'cando'], fnPageInit); \ No newline at end of file