- 注册时间
- 2013-7-8
- 最后登录
- 2019-1-9
- 阅读权限
- 10
- 积分
- 103
- 精华
- 0
- 帖子
- 24
|
我form下有几个字段和一个grid 我怎么获取grid的josn数据
<legend>服务套餐</legend>
<div class="fieldset-body">
<table class="table_search" style="width:100%;" >
<tr>
<td style="width:11%;" align="right">套餐名称:</td>
<td >
<input id="mealname" name="mealname" class="mini-textbox" emptyText="请输入套餐名称"/>
</td>
<td style="width:11%;" align="right">套餐金额:</td>
<td >
<input id="mealpay" name="mealpay" class="mini-textbox" emptyText="请输入套餐金额"/>
</td>
<td style="width:11%;" align="right">街道:</td>
<td >
<input name="jd" id="jd" textField="value" valueField="code" class="mini-combobox" shownullitem="false" multiselect="false" data="${applicationScope.dic['310115']}"/>
</td>
</tr>
<tr>
<td align="right">备注:</td>
<td colspan="3">
<textarea id="remark" name="remark" class="mini-textarea" emptyText="请输入备注" style="width:400px;height:60px;"></textarea>
</td>
</tr>
</table>
</div>
<div class="mini-toolbar" style="border-bottom: 0; padding: 0px;">
<table>
<tr>
<td>
<auth:authorization isAuthorization="true" authId="auth_button_add" authType="1">
<a name="addButton" id="addButton" class="mini-button" iconCls="icon-add" plain="false" style="display: display;">项目选择</a>
</auth:authorization>
<auth:authorization isAuthorization="true" authId="auth_button_add" authType="1">
<a name="addButton" id="addButton" class="mini-button" iconCls="icon-add" plain="false" style="display: display;">项目删除</a>
</auth:authorization>
</td>
</tr>
</table>
</div>
<div id="datagrid1" name="datagrid1" class="mini-datagrid" style="width: 100%" allowCellSelect="true" allowCellEdit="true" multiSelect="true">
<div property="columns">
<div type="checkcolumn"></div>
<div type="indexcolumn" headerAlign="center" align="center">序号</div>
<div field="itemid" name="itemid" headerAlign="center" align="center" allowSort="true" width="30">id</div>
<div field="sqfwxmflid" name="sqfwxmflid" headerAlign="center" align="center" allowSort="true" width="60" renderer="onGenderRendererfwxm">服务项目</div>
<div field="fwnrmc" name="fwnrmc" headerAlign="center" align="center" allowSort="true" width="70">服务名称</div>
<div field="fwdj" name="fwdj" headerAlign="center" align="center" allowSort="true" width="65">服务指导价</div>
<div field="sflxid" name="sflxid" headerAlign="center" align="center" allowSort="true" width="70" renderer="onGenderRenderersflx">收费类型</div>
<div field="ckfwsj" name="ckfwsj" headerAlign="center" align="center" allowSort="true" width="70">参考服务时间</div>
<div field="fwfwid" name="fwfwid" headerAlign="center" align="center" allowSort="true" width="60" renderer="onGenderRendererfwfw">服务范围</div>
<div field="fwcs" name="fwcs" headerAlign="center" align="center" allowSort="true" property="editor" width="55">服务次数
<input property="editor" class="mini-textbox" style="width:100%;"/>
</div>
<div field="fwdj" name="fwdj" headerAlign="center" align="center" allowSort="true" property="editor" width="55">服务单价
<input property="editor" class="mini-textbox" style="width:100%;"/>
</div>
<div field="fwje" name="fwje" headerAlign="center" align="center" allowSort="true" width="55">服务金额</div>
</div>
</div>
</fieldset>
//新增
function addInfo() {
var form = new mini.Form("saveForm");
var o = form.getData();
form.validate();
if (form.isValid() == false) return;
var validateFlag = checkValidate();
if (validateFlag) return;
var json = mini.encode(o);
$.ajax({
url: "${pageContext.request.contextPath}/project/project/mealAction!saveInfo.action",
data: { data: json },
type: "post",
success: function () {
mini.confirm('保存成功,是否关闭','确认',function(action){
if(action=='ok'){
window.CloseOwnerWindow();
}
});
}
});
}
我用var o = form.getData(); 获取不到grid数据
|
|