迭代后如何从百里香中声明的变量中减去数字?

时间:2018-11-23 11:57:18

标签: java spring-boot thymeleaf

下面是我的百里香叶标记。声明了一个变量“余额”,该变量应在每次迭代后递减特定数量。

<tbody id="tbody" th:with="balance=${paymentDetails.paymentHead.amount}">

  <th:block th:each="invoice_items,i : ${paymentDetails.invoice_amount}">

    <tr class="item_row">

    <td class="text-center chk">
      <input class="chkSelect" th:checked="${balance} gt 0"     type="checkbox" style="margin:2px;">
    </td>
     <p th:with="balance=${balance - invoice_items.balance_amount}"> </p>
    <td><input type="text" name="balance[]" style="width: 100%;border:none;background-color: #fff;cursor: default" th:value="${balance}" class="form-control balance text-right" readonly></td>
   </tr>
      </th:block>
   </tbody>          

0 个答案:

没有答案