|

楼主 |
发表于 2017-10-25 16:47:35
|
显示全部楼层
本帖最后由 BooleanChar 于 2017-10-25 16:53 编辑
解决过程:
 
1.在结算按钮的单击事件上,查找选中行数据的fID,遍历行数组后,拼接fID,
再通过showPage的方式打开确认订单页面,并将拼接好的fID传给确认订单页
- //结算按钮
- Model.prototype.settlementClick = function(event) {
- var goodsCarData = this.comp("goodsCarData");
- var shoppingcarData = this.comp("shoppingcarData");
- var goodsCarDataRows = goodsCarData.find([ "fFlag" ], [ "1" ]);
- var ids = "''";
- for (var i = 0; i < goodsCarDataRows.length; i++) {
- debugger;
- var fID = goodsCarDataRows[i].val("fID");
- // ids = "'','123','123'"
- ids += ",'" + fID + "'";
- }
- justep.Shell.showPage("firmOrder",{
- data : {
- fIDs : ids
- }
- });
- };
复制代码 2.在确认订单页面的onParamsReceive事件中接收参数,定义全局变量fIDs,然后对数据组建进行过滤
- //参数接收
- Model.prototype.modelParamsReceive = function(event){
- debugger;
- var goodsCarData = this.comp("goodsCarData");
- fIDs = event.data.data.fIDs;
- goodsCarData.setFilter("f1", "V_goodsCar.fID in (" + fIDs + ")");
- goodsCarData.refreshData();
- };
复制代码
|
|