From 640ff18d2d7f4be02ddb7f8f75e899f05545eb98 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 05 二月 2024 11:56:52 +0800 Subject: [PATCH] 更新bug修改 --- cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html | 67 +++++++++++++++++++++++++++------ 1 files changed, 55 insertions(+), 12 deletions(-) diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html index bd601b6..b8c7926 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/tSite/TSite_edit.html @@ -1,4 +1,4 @@ -@layout("/common/_container.html"){ + @layout("/common/_container.html"){ <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script> <style> .avatar-uploader .el-upload { @@ -47,6 +47,7 @@ <div class="form-horizontal" id="carInfoForm"> <input id="type_" value="${list.ishalf}" hidden> + <input id="objectType" value="${objectType}" hidden> @if(objectType == 1){ <div class="form-group" > @@ -73,12 +74,23 @@ </select> </div> </div> - <div class="form-group" id="siteType"> + + <div class="form-group" > <label class="col-sm-3 control-label">*场地类型:</label> + <div class="col-sm-9"> + <select style="width: 300px" class="form-control" id="siteTypeOne" name = "typeId" onchange="updateTime1()"> + @for(obj in typeNames){ + <option value="${obj}" ${obj == list.typeName ? 'selected=selected' : ''}>${obj}</option> + @} + </select> + </div> + </div> + <div class="form-group" id="siteType"> + <label class="col-sm-3 control-label">*场地分类:</label> <div class="col-sm-9"> <select style="width: 300px" class="form-control" id="siteTypeId" name = "typeId"> @for(obj in siteType){ - <option value="${obj.id}">${obj.name}</option> + <option value="${obj.id}" ${obj.id == list.siteTypeId ? 'selected=selected' : ''}>${obj.name}</option> @} </select> </div> @@ -103,7 +115,7 @@ <label class="col-sm-3 control-label">*现金价格:</label> <div class="col-sm-9" style="display: flex;"> <input style="width: 300px" class="form-control" id="cashPrice" name="playPaiCoin" type="text" value="${list.cashPrice}"> - <span style="margin-left: 5px;margin-top: 5px">元/半小时</span> + <span style="margin-left: 5px;margin-top: 5px" id="priceLabel">元/半小时</span> </div> </div> @@ -111,13 +123,13 @@ <label class="col-sm-3 control-label">*玩湃币价格:</label> <div class="col-sm-9" style="display: flex;"> <input style="width: 300px" class="form-control" id="playPaiCoin" name="playPaiCoin" type="text" value="${list.playPaiCoin}"> - <span style="margin-left: 5px;margin-top: 5px">币/半小时</span> + <span style="margin-left: 5px;margin-top: 5px" id="priceLabel1">币/半小时</span> </div> </div> <div class="form-group" id="siteMore" style=" margin-left: 255px;"> <div class="form-group">多场地配置:<i class="fa fa-plus" onclick="addBox()"></i></div> - @for(n in nextNames){ + @for(n in nextNames!){ <div class="col-sm-8 control-label" id="far"> <label class="col-sm-2 control-label">*单个场地名</label> <div class="col-sm-3"> @@ -143,7 +155,7 @@ <label class="col-sm-3 control-label">*现金价格:</label> <div class="col-sm-9" style="display: flex;"> <input style="width: 300px" class="form-control" id="cashPriceOne" name="playPaiCoin" placeholder="请输入价格" type="text" value="${list.cashPriceOne}"> - <span style="margin-left: 5px;margin-top: 5px">元/半小时</span> + <span style="margin-left: 5px;margin-top: 5px" id="priceLabel3">元/半小时</span> </div> </div> @@ -151,7 +163,7 @@ <label class="col-sm-3 control-label">*玩湃币价格:</label> <div class="col-sm-9" style="display: flex;"> <input style="width: 300px" class="form-control" id="playPaiCoinOne" name="playPaiCoin" placeholder="请输入价格" type="text" value="${list.playPaiCoinOne}"> - <span style="margin-left: 5px;margin-top: 5px">币/半小时</span> + <span style="margin-left: 5px;margin-top: 5px" id="priceLabel4">币/半小时</span> </div> </div> @@ -191,7 +203,6 @@ <button class="btn btn-outline btn-success" type="file" onclick="UploadFileFn()"><i class="fa fa-upload"></i>上传文件</button> </div> </div> - @if(objectType ==1){ <div class="row" id="app1"> <div class="form-group"> <label class="col-sm-3 control-label head-scu-label">*实景图片(请上传不超过五张图片): </label> @@ -213,22 +224,21 @@ </div> </div> </div> - @} </div> - @if(objectType==1){ <div class="form-group" style="margin-left: 205px;"> <label class="col-sm-1 control-label">*添加闸机:</label> <div class="col-sm-9"> <input class="form-control" id="ids" name="ids" value="${list.ids}" type="text" style="width: 300px" placeholder="请输入闸机ID"> </div> </div> - @} + @if(objectType==1){ <div class="form-group" style="margin-left: 13%;display: inline-flex;margin-top: 16px;" > <label class="col-sm-2 control-label">场地说明:</label> <div class="col-sm-5" style="margin-left: -35px;"> <textarea type="text/plain" id="editor" style="height: 300px;width: 800px;">${list.introduce}</textarea> </div> </div> + @} <div class="row btn-group-m-t"> <div class="col-sm-10 col-sm-offset-5" > @if(type==1){ @@ -249,6 +259,35 @@ <script src="${ctxPath}/js/elementui/index.js"></script> <link rel="stylesheet" href="${ctxPath}/js/elementui/index.css"> <script> + + function updateTime1() { + var selectedValue = document.getElementById("siteTypeOne").value; + var priceLabel = document.getElementById("priceLabel"); + var priceLabel1 = document.getElementById("priceLabel1"); + var priceLabel3 = document.getElementById("priceLabel3"); + var priceLabel4 = document.getElementById("priceLabel4"); + + if (selectedValue === "智慧场地") { + console.log("=============智慧场地=") + priceLabel.innerText = "元/15分钟"; + priceLabel1.innerText = "元/15分钟"; + priceLabel3.innerText = "元/15分钟"; + priceLabel4.innerText = "元/15分钟"; + } else { + priceLabel.innerText = "元/半小时"; + priceLabel1.innerText = "元/半小时"; + priceLabel3.innerText = "元/半小时"; + priceLabel4.innerText = "元/半小时"; + } + + + + // $("#end-time").val(''); + // $("#start-time").val(''); + } + + + let id = "${list.imgs}" let obj = [] console.log("看看") @@ -321,6 +360,10 @@ window.onload = function(){ + var siteTypeOne = document.getElementById('siteTypeOne'); + siteTypeOne.onchange(); // Trigger the onchange event + + console.log("${list.operatorId}") if("${list.operatorId}"==0){ console.log(233232) -- Gitblit v1.7.1