- 注册时间
- 2012-8-26
- 最后登录
- 2013-4-27
- 阅读权限
- 10
- 积分
- 510
- 精华
- 0
- 帖子
- 149
|
本帖最后由 guoweidong 于 2012-10-5 20:19 编辑
- function promptClick() {
- //检测快运单号是否存在
- $.post("@Url.Action("getExpressNumber", "Shipments")", { companyCode: mini.get("companyCode").getValue() }, function (result) {
- if (result.errMsg == undefined) {
- HideCheckCodePanel();
- mini.open({
- url: "@Url.Action("VerificationShipments")",
- title: "验证发货", width: 1000, height: 560,
- onload: function () {
- var iframe = this.getIFrameEl();
- iframe.contentWindow.SetData(result);
- },
- ondestroy: function (action) {
- grid.reload();
- gridpro.reload();
- }
- });
- } else {
- alert(result.errMsg);
- }
- });
- }
复制代码
第一个窗口操作提交数据到弹出窗
- function SetData(data) {
- form.setData(data);
- gridz.load({ companycode: data.company_Code, Gifts: true });
- gridi.load({ companycode: data.company_Code, Gifts: false });
- setGridShowContent(gridz);
- setGridShowContent(gridi);
- }
复制代码 弹出窗接收数据并加载了数据到2个DataGrid
- $(document).ready(function () {
- gridc.load();
- });
- function onGridLoad(e) {
- var result = e.result;
- getCount(result.data);
- }
- function getCount(data) {
- var gridilength = gridi.getData();
- var gridzlength = gridz.getData();
- var FCount = 0;
- for (var i = 0; i < gridilength.length; i++) {
- FCount += gridilength[i].Num;
- }
- for (var i = 0; i < gridzlength.length; i++) {
- FCount += gridzlength[i].Num;
- }
- if (data != null) {
- document.getElementById("VerificationCount").innerHTML = gridilength + "/" + FCount;
- }
- else {
- document.getElementById("VerificationCount").innerHTML = 0 + "/" + FCount;
- }
- }
复制代码
第三个DataGrid加载时调用不到加载过的数据,好像操作时加载还没完成,这里该怎么处理?如果在中间加个alert下就可以了~
|
|