修复点餐区只有一行数据时显示异常的问题

master
pan 5 years ago
parent 3ba93e9fb6
commit 2b7095d686
  1. 7
      src/main/resources/templates/order.html

@ -38,15 +38,14 @@
zuofa.value = detailList[index].sum zuofa.value = detailList[index].sum
changePinmu(fenlei, pinmu, cailiao, detailList[index]) changePinmu(fenlei, pinmu, cailiao, detailList[index])
jine.value = [[${query.jine}]] jine.value = [[${query.jine}]]
}
if(detailList.length===1) { if(detailList.length===1) {
list.innerHTML+=`<div class="input-group mt-3 order-frame fff"> list.innerHTML += `<div class="input-group mt-3 order-frame" id="add">
<div class="col-3 text-right mt-auto mb-auto"> <div class="col-3 text-right mt-auto mb-auto">
<img src="/icon/plus.svg" class="icon action" onclick="plus()"/> <img src="/icon/plus.svg" class="icon action" onclick="plus()"/>
<img src="/icon/minus.svg" class="icon action" onclick="minus(this)"/>
</div> </div>
</div>` </div>`
} }
}
}else { }else {
let item = document.getElementsByClassName('fff') let item = document.getElementsByClassName('fff')
for (let i in item) { for (let i in item) {
@ -247,7 +246,7 @@
</div> </div>
<div id="list"> <div id="list">
<div class="input-group mt-3 order-frame d-none" id="add"> <div th:if="${querydetail} eq null" class="input-group mt-3 order-frame d-none" id="add">
<div class="col-3 text-right mt-auto mb-auto"> <div class="col-3 text-right mt-auto mb-auto">
<img src="/icon/plus.svg" class="icon action" onclick="plus()"/> <img src="/icon/plus.svg" class="icon action" onclick="plus()"/>
</div> </div>

Loading…
Cancel
Save