js代码:

function  modifyPactMoney(){
var table=$("#pactfee");
var trs=table.find("tr");
//先把保证金的重算
for(var i=0;i<trs.length;i++){
var feerate=$("#pactfee").find("[name='pactfeelist["+i+"].feerate']:last");
var feetype=$("#pactfee").find("[name='pactfeelist["+i+"].feetype']:last");
var feeratename=$(feerate).attr("name");
var feetypeval=$(feetype).val();
if(feeratename!=null && feeratename!=undefined && feetypeval=='301'){
checkfeewill(feerate);
}
}
//然后再算其他的费用,因为其他费用是需要减掉保证金的
for(var i=0;i<trs.length;i++){
var feerate=$("#pactfee").find("[name='pactfeelist["+i+"].feerate']:last");
var feetype=$("#pactfee").find("[name='pactfeelist["+i+"].feetype']:last");
var feeratename=$(feerate).attr("name");
var feetypeval=$(feetype).val();
if(feeratename!=null && feeratename!=undefined && feetypeval!='301'){
checkfeewill(feerate);
}
}
}

  jsp代码:

<tr>
<td width="20%" class="td_left" style="align-text:center;">保函费用及<br/>保证金标准</td>
<td colspan="3">
<table class="report_table" style="width:100%" id="pactfee">
<tr>
<td style="width:18px;align-text:center;">
<img src="<s:url value="/images/report/grid_tool_add.gif"/>" onclick="myinsertRow($(this).parent().parent().parent().parent(),'pactfeelist',/(pactfeelist\[\d{1,}\])/ig,1,1);" ALT="新增费用" />
</td>
<td style="width:20%;text-align:center;" >收费种类</td>
<td style="width:20%;text-align:center;" >收费方式</td>
<td style="width:20%;text-align:center;" >比率(费率/利率)%</td>
<td style="width:20%;text-align:center;" >应收费用(元)</td>
<td style="text-align:center;" >币种</td>
</tr>
<tr name="pactfeelist" style="display:none">
<td>
<img src="<s:url value="/images/report/grid_tool_del.gif" />" onclick="deleteRow($(this).parent().parent());modifyPactMoney();" />
<input type="hidden" name="pactfeelist[0].projid" value="<s:property value="projid"/>" disabled="true"/>
<input type="hidden" name="pactfeelist[0].feepactid" value="" disabled="true"/>
</td>
<td>
<dict:select dictTypeId="BMS_VOUCHER_TYPE" onblur="checkDefault($(this));" name="pactfeelist[0].feetype" value="" cssClass="easyui-validatebox feetype" rule="required:true" disabled="true"/>
</td>
<td>
<dict:select dictTypeId="BMS_FEE_METHOD" name="pactfeelist[0].feemethod" value="" cssClass="easyui-validatebox" rule="required:true" disabled="true"/>
</td>
<td>
<input type="text" id="pactfeelist[0].feerate" name="pactfeelist[0].feerate" onblur="modifyPactMoney();" onfocus="checkPactMoney();" disabled="true" class="easyui-validatebox feerate" data-options="required:true,validType:'number'" style="width:120px;"/>
</td>
<td>
<input type="text" id="pactfeelist[0].feewill" onblur="allFeeSum();" name="pactfeelist[0].feewill" disabled="true" class="easyui-validatebox feewill" data-options="required:true,validType:'number'" style="width:120px;"/>
</td>
<td>
<dict:select dictTypeId="BMS_REGCURRID_TYPE" name="pactfeelist[0].currency" defultValue="001" value="" cssClass="easyui-validatebox" rule="required:true" disabled="true"/>
</td>
</tr>
<s:if test="!pactfeelist.isEmpty">
<s:iterator value="pactfeelist" var="feeInfo" status="stus">
<tr name="pactfeelist">
<td>
<img src="<s:url value="/images/report/grid_tool_del.gif" />" onclick="deleteRow($(this).parent().parent());modifyPactMoney();" />
<input type="hidden" name="pactfeelist[<s:property value="#stus.index + 1"/>].projid" value="<s:property value="projid"/>"/>
<input type="hidden" name="pactfeelist[<s:property value="#stus.index + 1"/>].feepactid" value="<s:property value="feepactid"/>"/>
</td>
<td>
<dict:select dictTypeId="BMS_VOUCHER_TYPE" onblur="checkDefault($(this));" name="pactfeelist[%{#stus.index + 1}].feetype" value="#feeInfo.feetype" cssClass="easyui-validatebox feetype" rule="required:true"/>
</td>
<td>
<dict:select dictTypeId="BMS_FEE_METHOD" name="pactfeelist[%{#stus.index + 1}].feemethod" value="#feeInfo.feemethod" cssClass="easyui-validatebox" rule="required:true"/>
</td>
<td>
<input type="text" id="pactfeelist[<s:property value="#stus.index + 1"/>].feerate" name="pactfeelist[<s:property value="#stus.index + 1"/>].feerate" onblur="modifyPactMoney();" onfocus="checkPactMoney();" value="<v:property value="feerate" number="true"/>" class="easyui-validatebox feerate" data-options="required:true,validType:'number'" style="width:120px;"/>
</td>
<td>
<input type="text" id="pactfeelist[<s:property value="#stus.index + 1"/>].feewill" name="pactfeelist[<s:property value="#stus.index + 1"/>].feewill" onblur="allFeeSum();" value="<v:property value="feewill" number="true"/>" class="easyui-validatebox feewill" data-options="required:true,validType:'number'" style="width:120px;"/>
</td>
<td>
<dict:select dictTypeId="BMS_REGCURRID_TYPE" name="pactfeelist[%{#stus.index + 1}].currency" value="#feeInfo.currency" cssClass="easyui-validatebox" rule="required:true"/>
</td>
</tr>
</s:iterator>
</s:if> <s:else >
<tr name="pactfeelist">
<td>
<img src="<s:url value="/images/report/grid_tool_del.gif" />" />
<input type="hidden" name="pactfeelist[0].projid" value="<s:property value="projid"/>"/>
<input type="hidden" name="pactfeelist[0].feepactid" value="<s:property value="feepactid"/>"/>
</td>
<td>
<dict:select dictTypeId="BMS_VOUCHER_TYPE" onblur="checkDefault($(this));" name="pactfeelist[0].feetype" cssClass="easyui-validatebox feetype" rule="required:true"/>
</td>
<td>
<dict:select dictTypeId="BMS_FEE_METHOD" name="pactfeelist[0].feemethod" cssClass="easyui-validatebox" rule="required:true"/>
</td>
<td>
<input type="text" id="pactfeelist[0].feerate" name="pactfeelist[0].feerate" onblur="modifyPactMoney();" onfocus="checkPactMoney();" class="easyui-validatebox feerate" data-options="required:true,validType:'number'" style="width:120px;"/>
</td>
<td>
<input type="text" id="pactfeelist[0].feewill" name="pactfeelist[0].feewill" onblur="allFeeSum();" class="easyui-validatebox feewill" data-options="required:true,validType:'number'" style="width:120px;"/>
</td>
<td>
<dict:select dictTypeId="BMS_REGCURRID_TYPE" name="pactfeelist[0].currency" defultValue="001" cssClass="easyui-validatebox" rule="required:true"/>
</td>
</tr>
</s:else>
</table>
<table width="100%">
<tr>
<td width="64%" align="right">合计收费:</td>
<td >
<span id="allFeeSum"></span>元
<input type="hidden" id="baseInfoBZJFeeRate" value=""/>
</td>
</tr>
</table>
</td>
</tr>

  

获取struts迭代list在页面显示的数据的更多相关文章

  1. 判断数据库内容,在页面显示自定义数据case when

    判断数据库内容,在页面显示自定义数据 case when...then ...else...end 比如:数据库内容是这样: 通过sql语句判断,数据库的name字段,内容是月桂的,显示嫦娥,其他的显 ...

  2. Django admin页面 显示中文问题

    http://127.0.0.1:8000/admin/ 该页中实现中文显示. 1.  页面显示的数据表表名 实现中文显示. models.Model类的内部类Meta,有两个特殊的选项:verbos ...

  3. 【SSH网上商城项目实战22】获取银行图标以及支付页面的显示

        转自: https://blog.csdn.net/eson_15/article/details/51452243 从上一节的小demo中我们搞清楚了如何跟易宝对接以及易宝的支付流程.这一节 ...

  4. 用struts2标签如何从数据库获取数据并在查询页面显示。最近做一个小项目,需要用到struts2标签从数据库查询数据,并且用迭代器iterator标签在查询页面显示,可是一开始,怎么也获取不到数据,想了许久,最后发现,是自己少定义了一个变量,也就是var变量。

    最近做一个小项目,需要用到struts2标签从数据库查询数据,并且用迭代器iterator标签在查询页面显示,可是一开始,怎么也获取不到数据,想了许久,最后发现,是自己少定义了一个变量,也就是var变 ...

  5. Java从服务器上获取时间,动态在jsp页面显示

    Java获取服务器时间,动态显示到jsp页面,大家都是到Java只能获取一次,到页面的时间是静态的,不过通过js和Java的合作,巧妙地实现此功能 本人是给电视做系统,客户要求页面能显示时间,因为电视 ...

  6. 记录-在jsp页面获取后台值在页面显示过长处理

    在下面的红色标记处 后台获取的值(字符串)在页面显示过长或者与其他重叠 (xxx).cutStr(15) 15代表的是展示字符串的长度 data.rows[i].avgPrice, ), data.r ...

  7. HTML 获取屏幕、浏览器、页面的高度宽度

    本篇主要介绍Web环境中屏幕.浏览器及页面的高度.宽度信息. 目录 1. 介绍:介绍页面的容器(屏幕.浏览器及页面).物理尺寸与分辨率.展示等内容. 2. 屏幕信息:介绍屏幕尺寸信息:如:屏幕.软件可 ...

  8. 转:jsp页面显示中文乱码解决方案

    jsp页面显示中文乱码: jsp页面的编码方式有两个地方需要设置: <%@ page language="java" import="java.util.*&quo ...

  9. js控制页面显示和表单提交

    早期的web页面在显示方面一般在后台进行控制,虽然对后台开发来讲是比较容易做到的,但是涉及到一个问题,那就是数据库压力. 因为要控制显示,所以会比较频繁的从数据库中来回调用. 现在的js功能越来越强, ...

随机推荐

  1. redis基础和通用key操作

    redis是什么? redis开源的,构建于内存的数据结构的nosql数据库.常被用于数据存储,缓存处理和消息处理. redis的优势? 1.极高的读写能力 2.丰富的数据类型 3.原子性操作 4.支 ...

  2. web相关基础知识4

      一.定位的盒子居中 Css可见性 overflow: hidden;   溢出隐藏   常用在超出盒子之后就隐藏 visibility: hidden;   隐藏元素    隐藏之后还占据原来的位 ...

  3. 关于MySQL的异常处理 Can't connect to MySQL server on localhost (10061)解决方法

    首先检查MySQL 服务没有启动>如果没有启动,则要启动这个服务. 昨天,重起服务器后出现MySQL 'localhost' (10061)错误,开始以为是因为数据库链接打开过多,数据库资源耗尽 ...

  4. HashSet如何判定两个元素相同

    在介绍java的集合时,我们提到,set是一个"罐子".我们可以向其中放入各式各样的元素,这些元素没有顺序,但不能相同.其中,HashSet是最常用的一个实现类. 首先,我们看下H ...

  5. [C/C++] 智能指针学习

    转自:http://blog.csdn.net/xt_xiaotian/article/details/5714477 一.简介 由于 C++ 语言没有自动内存回收机制,程序员每次 new 出来的内存 ...

  6. IE6中png背景图片透明的最好处理方法

    在IE6浏览器下png(24位)的图片显示是不能透明的. 1.处理办法就是用DDPngMin.js <!--[if IE 6]> <script src="js/DDPng ...

  7. 【题解】CQOI2015选数

    这题做的时候接连想错了好多次……但是回到正轨上之后依然是一个套路题.(不过这题好像有比莫比乌斯反演更好的做法,莫比乌斯反演貌似是某种能过的暴力ヽ(´ー`)┌)不过能过也就行了吧哈哈. 首先我们把数字的 ...

  8. 周记【距gdoi:105天】

    月考果然很可怕,跪得要死. 然后这周搞(被老师坑)去搞某个程序,我和蔡大神和kpm分工搞(结果最后我也只是变成全程嘴炮). 这周有点闷,明明想快乐点但还是…… 进度慢得要死,后缀数组略神的东西.模仿了 ...

  9. cdq分治入门学习 cogs 1752 Mokia nwerc 2015-2016 G 二维偏序

    /* CDQ分治的对象是时间. 即对于一个时间段[L, R],我们取mid = (L + R) / 2. 分治的每层只考虑mid之前的修改对mid之后的查询的贡献,然后递归到[L,mid],(mid, ...

  10. 洛谷 P2501 [HAOI2006]数字序列 解题报告

    P2501 [HAOI2006]数字序列 题目描述 现在我们有一个长度为n的整数序列A.但是它太不好看了,于是我们希望把它变成一个单调严格上升的序列.但是不希望改变过多的数,也不希望改变的幅度太大. ...