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. MySQL训练营02

    一.表操作: 1.MySQL表的数据类型: MySQL的数据类型分为3种: 数值 时间/日期 字符/字符串 (1)数值类型: 包括:TinyInt.SmallInt.MediumInt.Int.Big ...

  2. Visual Studio 2017离线安装包

    点击下载

  3. BZOJ 4276 [ONTAK2015]Bajtman i Okrągły Robin 费用流+线段树优化建图

    Description 有n个强盗,其中第i个强盗会在[a[i],a[i]+1],[a[i]+1,a[i]+2],...,[b[i]-1,b[i]]这么多段长度为1时间中选出一个时间进行抢劫,并计划抢 ...

  4. 有向图的强连通分量——kosaraju算法

    一.前人种树 博客:Kosaraju算法解析: 求解图的强连通分量

  5. Week2 Teamework from Z.XML - 必应缤纷桌面助手 - 软件分析与用户需求调查

    软件分析与用户需求调查(2013) from Z.XML 本次团队作业要求: 通过定性, 定量地分析, 总结和评定某软件是否满足了目标用户的需求,并把分析的过程和结果用博客表达出来. 选题:必应缤纷桌 ...

  6. epc笔记

    http://wenku.baidu.com/view/5e921520dd36a32d7375812a.html 1.  先注册, EPC注册EPS业务或non-EPS服务 ?? HSS做什么? 2 ...

  7. mysql ibd 文件还原数据

    -- 这里要还原的表名为 test_table -- 1建库,并选中库,库名随意 -- 2查看InnoDB 引擎独立表空间是否开启 SHOW VARIABLES LIKE '%per_table%' ...

  8. 自定义 Relam

    package org.zln.hello.realm; import org.apache.shiro.authc.*; import org.apache.shiro.realm.Realm; / ...

  9. 【BZOJ 1901】Zju2112 Dynamic Rankings &&【COGS 257】动态排名系统 树状数组套线段树

    外面是树状数组,里面是动态开点线段树,对于查询我们先把有关点找出来,然后一起在线段树上行走,这样就是单个O(log2)的了 #include <cstdio> #include <v ...

  10. 如何用Ajax传一个数组数据

    PHP接收多个同名复选框信息不像ASP那样自动转换成为数组,这给使用带来了一定不便.但是还是有解决办法的,就是利用javascript做一下预处 理.多个同名复选框在javascript中还是以数组的 ...