-
publicclass C extends ModelSupport {
-
private List<B> bList;
-
public List<B> getBList() {
-
return bList;
-
}
-
publicvoid setBList(List<B> bList) {
-
this.bList = bList;
-
}
-
}
-
<tr>
-
<td>${daily.buyGoodName}</td>
-
<td><inputtype="text"name="bList[0].dmGstorage"value="0"onkeyup="clearNoNum(this)"/></td>
-
<td><inputtype="text"name="bList[0].dmGoutflow"value="0"onkeyup="clearNoNum(this)"/></td>
-
<td><inputtype="text"name="bList[0].dmGinventory"value="0"/></td>
-
<td><inputtype="text"name="bList[0].dmGenableDay"value="0"onkeyup="clearNoNum(this)"/></td>
-
</tr>
A控制层Controller:
-
@RequestMapping("dmgSave")
-
@ResponseBody
-
public Json addSave(MaterialDailyMang mode,C c){
-
System.out.println(c.getBList().size());
-
Json json= super.addSave(mode);
-
//保存物品集合
-
for (B b : c.getBList()) {
-
MaterialDailyMang mang=(MaterialDailyMang) json.getObj();
-
b.setDmId(mang.getId());
-
materialDailyGoodService.addSave(b);
-
}
-
return json;
-
}