通过parent获得父表格里的行内容时,不会随着父表格里的选中行不同而值改变

提问 未结 4 1145
悬赏:20飞吻
这里切换选择幼儿园时,右边 新增->逐个表单 下 使用 parent.sCode的值不会跟着变。永远等于第一次选择园的代号。比如:一开始点的万科园,其sCode值是0101,在 新增->逐个表单下,通过parent.sCode可以获得0101,但当重新点智慧树幼儿园(sCode是0102)时,新增->逐个表单下 通过parent.sCode获得的还是0101,没有自动变为0102。


代码如下:
<div data-toggle="topjui-layout" data-options="fit:true">
<div data-options="region:'west',title:'',split:true,border:false,width:'10%',iconCls:'fa fa-sitemap',headerCls:'border_right',bodyCls:'border_right'">
<!-- treegrid表格 -->
<table data-toggle="topjui-treegrid"
data-options="id:'orgnizationDatagrid',
idField:'sCode',
treeField:'sName',
url:'../control.php?f=model/System&m=schoolTree',
childGrid:{
param:'codeSetId:codeSetId,sSchoolCode:sCode',
grid:[
{type:'datagrid',id:'userDg'},
]
}">
<thead>
<tr>
<th data-options="field:'sName',title:'机构名称'"></th>
</tr>
</thead>
</table>
</div>
<div data-options="region:'center',iconCls:'icon-reload',title:'',split:true,border:false,bodyCls:'border_left_right'">
<!-- datagrid表格 -->
<table data-toggle="topjui-datagrid"
data-options="id:'userDg',pageSize:50,pageList:[30,50,100,150,200],
url:'../control.php?f=model/Enroll&m=enrollList',
childTab: [{id:'eastTabs'}],
emptyMsg:'无记录'
">
<thead>
<tr>
<th data-options="field:'uuid',title:'uuid',sortable:true"></th>
</tr>
</thead>
</table>
</div>
</div>

<!-- 表格工具栏开始 -->
<div id="userDg-toolbar" class="topjui-toolbar"
data-options="grid:{
type:'datagrid',
id:'userDg'
}">

<a href="javascript:void(0)" data-toggle="topjui-menubutton" data-options="menu:'#addSubMenu', btnCls:'topjui-btn-green',hasDownArrow:false,iconCls:'fa fa-plus'">新增</a>
<div id="addSubMenu" class="topjui-toolbar" style="width:80px;">
<div data-toggle="topjui-menubutton" data-options="method:'openDialog', extend: '#userDg-toolbar',iconCls: 'fa fa-id-card-o',
parentGrid:{type:'treegrid',id:'orgnizationDatagrid',param:'sSchoolCode:sCode',unselectedMsg:'请先选中左侧具体机构。'},
dialog:{iconCls: '',title:'新增(逐个表单)',id:'userAddDialog',
href:'../control.php?f=view/enroll_view&m=addEdit&sSchoolCode={parent.sCode}',
buttonsGroup:[
{text:'保存',url:'../control.php?f=model/Enroll&m=insertUpdate&no_html=1&sTreeNo=<?=$sTreeNo?>',iconCls:'fa fa-plus',handler:'ajaxForm',btnCls:'topjui-btn-green'}
]
}">逐个表单</div>
<div data-toggle="topjui-menubutton" data-options="method:'openDialog', extend: '#userDg-toolbar',iconCls: 'fa fa-file-excel-o',
parentGrid:{type:'treegrid',id:'orgnizationDatagrid',param:'sSchoolCode:sCode',unselectedMsg:'请先选中左侧具体机构。'},
dialog:{iconCls: '',title:'新增(Excel导入)',id:'userAddDialogExcel',
href:'../control.php?f=view/enroll_view&m=addEditExcel&no_db=1&sTreeNo=<?=$sTreeNo?>&sSchoolCode={parent.sCode}',
buttonsGroup:[
{text:'保存',url:'../control.php?f=model/Enroll&m=insertUpdateExcel',iconCls:'fa fa-plus',handler:'ajaxForm',btnCls:'topjui-btn-green'}
]
}">Excel导入</div>
</div>
</div>
回帖
回帖须知
QQ在线咨询
客服 QQ
251122361
微信/手机
18973127736
固定电话
0731-89565588