获取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功能越来越强, ...
随机推荐
- [ubuntu 18.04 + RTX 2070] Anaconda3 - 5.2.0 + CUDA10.0 + cuDNN 7.4.1 + bazel 0.17 + tensorRT 5 + Tensorflow(GPU)
(RTX 2070 同样可以在 ubuntu 16.04 + cuda 9.0中使用.Ubuntu18.04可能只支持cuda10.0,在跑开源代码时可能会报一些奇怪的错误,所以建议大家配置 ubun ...
- Tensorflow多线程输入数据处理框架
Tensorflow提供了一系列的对图像进行预处理的方法,但是复杂的预处理过程会减慢整个训练过程,所以,为了避免图像的预处理成为训练神经网络效率的瓶颈,Tensorflow提供了多线程处理输入数据的框 ...
- 小程序开发时PC端调试返回结果和手机端IOS不一致问题
IOS11登录时遇到一个请求与PC返回不一致情况, 在小程序调试时IOS上始终没有wx.request() 不能发送请求 尝试解决方法 打开微信小程序调试的设置, 将TLS设为可信任的域名 设置 -- ...
- MFC MDI 工程禁用win7任务栏(taskbar)多视图缩略图(preview)功能
花费了好几天,google上的把搜索关键字都想烂了终于搜出了答案 app的init函数中在创建mainframe之前调用 EnableTaskbarInteraction(FALSE);
- 软工实践 - 第二十一次作业 BETA 版冲刺前准备
软工 · BETA 版冲刺前准备(团队) 过去存在的问题 组员之间缺乏沟通,前后端缺乏沟通协作 组员积极性不高 基础知识不够扎实 手动整合代码效率过低 我们已经做了哪些调整/改进 通过会议加强组员之间 ...
- 我的python计划
一直想学习一种脚本语言.现在主流的脚本语言,比较先接触的是python 刚开始了解了一下python,感觉挺适合自己的感觉,学习了一段时间,之中感觉,就好象C++一样,把面向对象和面向过程编程结合了起 ...
- Flink之状态之状态存储 state backends
流计算中可能有各种方式来保存状态: 窗口操作 使用 了KV操作的函数 继承了CheckpointedFunction的函数 当开始做checkpointing的时候,状态会被持久化到checkpoin ...
- Maven中mirrors和repository的关系
一.前言 之前没有搞清楚pom.xml里面配置的repositorys节点配置的仓库和mirrors里面配置的仓库的“镜像”间的关系,特意去搜索了相关内容,这边有篇文章讲得透彻,所以这边转载一下~ 二 ...
- 生产服务器环境最小化安装后Centos 6.5优化配置备忘
生产服务器环境最小化安装后 Centos 6.5优化配置备忘 本文 centos 6.5 优化 的项有18处,列表如下: 1.centos6.5最小化安装后启动网卡 2.ifconfig查询IP进行S ...
- rman备份与异机恢复
一.rman备份脚本并为定时任务 #!/bin/bashsource ~/.bash_profileexport LANG=en_USBACKUP_DATE=`date +%d`#RMAN_LOG_F ...