获取struts迭代list在页面显示的数据
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在页面显示的数据的更多相关文章
- 判断数据库内容,在页面显示自定义数据case when
判断数据库内容,在页面显示自定义数据 case when...then ...else...end 比如:数据库内容是这样: 通过sql语句判断,数据库的name字段,内容是月桂的,显示嫦娥,其他的显 ...
- Django admin页面 显示中文问题
http://127.0.0.1:8000/admin/ 该页中实现中文显示. 1. 页面显示的数据表表名 实现中文显示. models.Model类的内部类Meta,有两个特殊的选项:verbos ...
- 【SSH网上商城项目实战22】获取银行图标以及支付页面的显示
转自: https://blog.csdn.net/eson_15/article/details/51452243 从上一节的小demo中我们搞清楚了如何跟易宝对接以及易宝的支付流程.这一节 ...
- 用struts2标签如何从数据库获取数据并在查询页面显示。最近做一个小项目,需要用到struts2标签从数据库查询数据,并且用迭代器iterator标签在查询页面显示,可是一开始,怎么也获取不到数据,想了许久,最后发现,是自己少定义了一个变量,也就是var变量。
最近做一个小项目,需要用到struts2标签从数据库查询数据,并且用迭代器iterator标签在查询页面显示,可是一开始,怎么也获取不到数据,想了许久,最后发现,是自己少定义了一个变量,也就是var变 ...
- Java从服务器上获取时间,动态在jsp页面显示
Java获取服务器时间,动态显示到jsp页面,大家都是到Java只能获取一次,到页面的时间是静态的,不过通过js和Java的合作,巧妙地实现此功能 本人是给电视做系统,客户要求页面能显示时间,因为电视 ...
- 记录-在jsp页面获取后台值在页面显示过长处理
在下面的红色标记处 后台获取的值(字符串)在页面显示过长或者与其他重叠 (xxx).cutStr(15) 15代表的是展示字符串的长度 data.rows[i].avgPrice, ), data.r ...
- HTML 获取屏幕、浏览器、页面的高度宽度
本篇主要介绍Web环境中屏幕.浏览器及页面的高度.宽度信息. 目录 1. 介绍:介绍页面的容器(屏幕.浏览器及页面).物理尺寸与分辨率.展示等内容. 2. 屏幕信息:介绍屏幕尺寸信息:如:屏幕.软件可 ...
- 转:jsp页面显示中文乱码解决方案
jsp页面显示中文乱码: jsp页面的编码方式有两个地方需要设置: <%@ page language="java" import="java.util.*&quo ...
- js控制页面显示和表单提交
早期的web页面在显示方面一般在后台进行控制,虽然对后台开发来讲是比较容易做到的,但是涉及到一个问题,那就是数据库压力. 因为要控制显示,所以会比较频繁的从数据库中来回调用. 现在的js功能越来越强, ...
随机推荐
- 安装配置hadoop
在master中安装并且配置hadoop (1).将hadoop-2.6.4.tar.gz安装包复制到hadoop文件目录下(直接赋值进去就行) (2).解压安装包haoddp-2.6.4.tar.g ...
- 为 Ubuntu/Anaconda/pip 添加国内下载源
背景 正在看 tensorflow-lite 压缩模型的部分,结果 tutorial 一上来就要卸旧版安装 tf-nightly (新版?反正小白下就vans了) 然而好不容易才编译好源码舍不得删.又 ...
- lintcode-96-链表划分
96-链表划分 给定一个单链表和数值x,划分链表使得所有小于x的节点排在大于等于x的节点之前. 你应该保留两部分内链表节点原有的相对顺序. 样例 给定链表 1->4->3->2-&g ...
- VS2015中常用快捷键的修改推荐
首先,在VS2015中修改快捷键的步骤如下: 工具--选项--环境--键盘. 如图: 然后就是修改快捷键:(以下是个人的使用习惯,仅供参考) 1.编辑.设置选定内容的格式.设置为ctrl+E,Ctrl ...
- WCF 动态调用(动态创建实例接口)
很多时候,服务地址都不止一个的,这个时候就要动态去配置地址.配置Web.config,很麻烦 下面就看看怎样实现动态调用WCF. 首先看看动态创建服务对象的代码: using System; usin ...
- IO流分类详细介绍和各种字节流类介绍与使用 过滤流 字节流
Java基础笔记 – IO流分类详细介绍和各种字节流类介绍与使用 过滤流 字节流本文由 arthinking 发表于627 天前 ⁄ Java基础 ⁄ 评论数 1 ⁄ 被围观 2,036 views+ ...
- Luogu3953 NOIP2017逛公园(最短路+拓扑排序+动态规划)
跑一遍dij根据最短路DAG进行拓扑排序,按拓扑序dp即可.wa了三发感觉非常凉. #include<iostream> #include<cstdio> #include&l ...
- hdu 3231 Box Relations (拓扑排序)
Box Relations Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tot ...
- hdu 3172 Virtual Friends (并查集)
Virtual Friends Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)T ...
- 【题解】Bzoj2125最短路
处理仙人掌 ---> 首先建立出圆方树.则如果询问的两点 \(lca\) 为圆点,直接计算即可, 若 \(lca\) 为方点,则需要额外判断是走环的哪一侧(此时与两个点在环上的相对位置有关.) ...