1.项目中需要传递多个参数值

function actionFtt(value, row, index) {
//传递查询需要的参数
var customerId = row.customerId;//竞买人ID
var bailClass = row.bailClass;//保证金类别 var agencyId = row.agencyId;//市场ID

  //使用合理的方式隔开
var detail = '<a href="#" onclick="detail(\'' + customerId + '\',\''+ bailClass + '\',\''+ agencyId + '\')">详情</a>';
if(top.checkRole(['LOCK_FORFEITRUE'])){
return detail;
} return "";
}

2.在使用easyui dialog 方法的时候传值问题

/**
* 保证金明细的详情信息
* 竞买人id()
* --- 通用 bailClass
* --- 专项 bailClass agencyId
*/
function detail(customerId,bailClass,agencyId){
//DIV对象
var detailLog= $('#dialog-alarm-detail').dialog(
{
title: '保证金明细详情',
width: '60%',
height:'60%',
modal: true,
closable:true,
href: parent.parent.baseUrl+"customer/bail/bailInfo",
onLoad: function () {
$.ajax({
type: "POST",
async: false,
success: function (result) {
//新创建的格式化的表格
$('#detail').datagrid({
idField : 'id', // 只要创建数据表格 就必须要加 ifField
// title : '保证金明细详情',
width: '100%',
height:'100%',
url : parent.parent.baseUrl+'customer/bail/bailDetailsInfo?customerId='+customerId+'&&bailClass='+bailClass+'&&agencyId='+agencyId,
method : 'GET',
fitColumns : true,
striped : true, // 隔行变色特性
nowrap : false,
loadMsg : '数据正在加载,请耐心的等待...',
rownumbers : true,
sortName : 'crtTime',
sortOrder : 'desc',
rowStyler : function(index, record) {},
columns : [ [{
field : 'updTime',
title : '冻结时间',
width : 50,
align : 'center',
}, {
field : 'bailStatus',
title : '保证金冻结状态',
width : 50,
align : 'center',
formatter : statusFot
}, {
field : 'lockBail',
title : '保证金冻结金额',
width : 80,
align : 'center'
}, {
field : 'goodsName',
title : '拍卖名称',
width : 80,
align : 'center'
}]],
pagination : false,
pageSize : 10,
pageList : [ 5, 10, 15, 20, 50 ],
}); }
});
},
buttons : [ {
text : "关闭",
handler : function() {
detailLog.dialog('close');
}
} ]
}); }

3.后台的web层代码

/**
* 查询保证金的明细的详情
* customerId
* bailClass
* agencyId
*
*/
@RequestMapping(value = "/bailDetailsInfo", method = RequestMethod.GET, produces = { "application/json" })
@ResponseBody
public ListWithTotalCount<BailLockDTO> bailDetailsInfo(Long customerId,int bailClass,String agencyId) {
if (logger.isDebugEnabled()) {
logger.debug("bailDetailsInfo, customerId:{}", customerId);
} List<BailLockDTO> retList = new ArrayList<BailLockDTO>();
BailLockDTO bailLockDto = null; if (bailClass == 1) {
Specification<BailLock> spec = (root, query, cb) -> {
List<Predicate> predicates = new ArrayList<Predicate>();
Predicate predicate1 = cb.equal(root.get(BailLock_.customerId), customerId);// 当前登录用户的id
predicates.add(predicate1);
Predicate predicate2 = cb.equal(root.get(BailLock_.bailClass), BailPay.BAIL_CLASS_TONGYONG);//通用
predicates.add(predicate2);
if (!predicates.isEmpty()) {
return cb.and(predicates.toArray(new Predicate[0]));
} else {
return null;
}
}; List<BailLock> bailLockList = bailLockRepository.findAll(spec);
if(bailLockList != null && bailLockList.size()>0){
for (BailLock bailLock : bailLockList) {
if (bailLock != null) {
String aucLotId = bailLock.aucLotId(); AucLot aucLot = aucLotRepository.findOne(aucLotId); //定义返回的信息值
bailLockDto = new BailLockDTO(bailLock.bailStatus(),aucLot.goodsName(),bailLock.lockBail(),bailLock.updTime());
retList.add(bailLockDto);
}
}
} } else { Specification<BailLock> spec = (root, query, cb) -> {
List<Predicate> predicates = new ArrayList<Predicate>();
Predicate predicate1 = cb.equal(root.get(BailLock_.customerId), customerId);// 当前登录用户的id
predicates.add(predicate1);
Predicate predicate2 = cb.equal(root.get(BailLock_.bailClass), BailPay.BAIL_CLASS_ZHUANXIANG);//专项
predicates.add(predicate2);
Predicate predicate3 = cb.equal(root.get(BailLock_.agencyId), agencyId);//机构id
predicates.add(predicate3);
if (!predicates.isEmpty()) {
return cb.and(predicates.toArray(new Predicate[0]));
} else {
return null;
}
}; List<BailLock> bailLockList = bailLockRepository.findAll(spec);
if(bailLockList != null && bailLockList.size()>0){
for (BailLock bailLock : bailLockList) {
if (bailLock != null) {
String aucLotId = bailLock.aucLotId(); AucLot aucLot = aucLotRepository.findOne(aucLotId); //定义返回的信息值
bailLockDto = new BailLockDTO(bailLock.bailStatus(),aucLot.goodsName(),bailLock.lockBail(),bailLock.updTime());
retList.add(bailLockDto);
}
}
} } return new ListWithTotalCount<BailLockDTO>(retList,100);
}

最新文章

  1. 使用JavaScript访问子节点方法elementNode.childNodes时,需要注意的地方
  2. SpringMVC中利用@InitBinder来对页面数据进行解析绑定
  3. linux环境下部署tomcat
  4. Molecule – 帮助你构建跨平台的 HTML5 游戏
  5. 【html】:禁止鼠标事件
  6. Ubuntu11.10 更新软件源source.list (ZT)
  7. 第10章 PHP异常处理
  8. 斯坦福 IOS讲义 课件总结 三
  9. 强大的Http监控工具Fidder
  10. Spring中Quartz动态设置cronExpression
  11. SynchronousQueue、LinkedBlockingQueue、ArrayBlockingQueue性能测试(转)
  12. spring的value,null标签
  13. 利用&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;URL=?id=&#39;.$id.&#39;&quot; /&gt;一条一条的更新数据
  14. 有货前端 Web-APM 实践
  15. C#VS2017添加ReportViewer控件
  16. c#清空数组&amp;初始化数组&amp;动态数组
  17. springboot2 config_toolkit 并且设置全局获取数据GlobalUtil
  18. mosquitto集群配置
  19. C#-微信公众平台接口-上传临时素材
  20. LaTeX 公式字体大小设置

热门文章

  1. operating expense &amp; captial expenditure
  2. C# winform多线程的小例子
  3. A Regularized Competition Model for Question Diffi culty Estimation in Community Question Answering Services-20160520
  4. 【转】赶集网mysql开发36军规
  5. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project standalone-pom: Unable to parse configuration of 3: mojo org.apache.maven.plugins:
  6. iOS- -安装cocopods
  7. Javascript写了一个2048的游戏
  8. eclipse-mvn打包跳过junit测试类
  9. 【POJ 1698】Alice&#39;s Chance(二分图多重匹配)
  10. 【BZOJ-1097】旅游景点atr SPFA + 状压DP