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. 【读书笔记】2_增强学习中的Q-Learning

    本文为Thomas Simonini增强学习系列文章笔记或读后感,原文可以直接跳转到medium系列文章. 主要概念为: Q-Learning,探讨其概念以及用Numpy实现 我们可以将二维游戏想象成 ...

  2. Java串口编程学习1-环境配置(64位Win7)

    最近在做zigbee的课程设计,需要Java实现对串口数据的读写操作. 网上找了很多代码,好像都比较过时了,直接拿来用没法跑通……QAQ……然后自己写个教程留底,如有不当之处还请各位路过的大神赐教. ...

  3. IDE API SDK JDK

    一.IDE 英文全称:Integrated Development Environment 中文名称:集成开发环境 本质:应用程序 功能:提供程序开发环境 组成:代码编辑器.编译器.调试器.图形用户界 ...

  4. 关于debian配置的问题汇总

    debian的apache多域名配置: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-ho ...

  5. windows下Memcached 架设及java应用(转)

    1 Memcache是什么 Memcache是danga.com的一个项目,最早是为 LiveJournal 服务的,目前全世界不少人使用这个缓存项目来构建自己大负载的网站,来分担数据库的压力. 它可 ...

  6. 背景图片移动插件MyFloatingBg(浮动背景图效果,可让背景随着页面的滚动而滚动)

    MyFloatingBg这插件可以帮助你在网页上加入可移动背景Background.你可以用于整个文件的背景,或是某几个banner的背景. 它可支持简单的animation效果,你不用去做一个fla ...

  7. ASP.NET页面之间传值Session(2)

    想必这个肯定是大家使用中最常见的用法了,其操作与Application类似,作用于用户个人,所以,过量的存储会导致服务器内存资源的耗尽. 优点:1.使用简单,不仅能传递简单数据类型,还能传递对象. 2 ...

  8. BZOJ4456 ZJOI2016旅行者(分治+最短路)

    感觉比较套路,每次在长边中轴线处切一刀,求出切割线上的点对矩形内所有点的单源最短路径,以此更新每个询问,递归处理更小的矩形.因为若起点终点跨过中轴线是肯定要经过的,而不跨过中轴线的则可以选择是否经过中 ...

  9. Codeforces Round #268 (Div. 1) 468D Tree(杜教题+树的重心+线段树+set)

    题目大意 给出一棵树,边上有权值,要求给出一个1到n的排列p,使得sigma d(i, pi)最大,且p的字典序尽量小. d(u, v)为树上两点u和v的距离 题解:一开始没看出来p需要每个数都不同, ...

  10. ARC075 E.Meaningful Mean(树状数组)

    题目大意:给定n和k,问an中有多少子区间的平均值大于等于k 很巧妙的一个式子,就是如果一个区间[l, r]满足条件 那么则有 sum[r] - sum[l-1] >= (r-l+1)*k 整理 ...