使用$.ligerui.getPopupFn引入子grid中的行数据到父grid中。不过自己不太懂getpopuFn中的参数,求高手指点。
function f_import(param) { param = encodeURI(param); var fn = $.ligerui.getPopupFn({ //top: 80, onSelect: function (e) { parent.updatemanage.addRows(e.data); }, grid: { columns: [ { display: 'ID', name: 'id', hide: true}, { display: '配件编码', name: 'code', width: 140 }, { display: '配件名称', name: 'parts_name', width: 120 }, { display: '配件分类', name: 'category', width: 120, type: 'int', render: function (item) { if (item.category == 0) { return '返修件'; } else if (item.category == 1) { return '新配件'; } } }, { display: '单位', name: 'units', width: 120 }, { display: '价格', name: 'price', width: 80 }, { display: '是否返件', name: 'isback', width: 80, type: 'int', render: function (item) { if (item.isback == 1) { return '是'; } else { return '<font color="red">否</font>'; } } }, { display: '备注', name: 'remark', width: 120 }, ], isScroll: false, checkbox: true, url: 'SelectPartsInfo.aspx?Action=GetData¶m=' + param, width: '95%', toolbar: { items: [ { text: "查询", click: ActionTools, img: "../../../lib/ligerUI/skins/icons/search2.gif" }, { line: true } ] } } }); fn();