With wb.AddTable("form1","detailTable") '为了区分,明细表的名字设为detailTable
.head.AddRow("任务明细编号","任务明细名称","字段类型")
.ActiveSheet = "menu" '指定菜单
.Alternate = 2
.PageNumber = page '设置页码
.Primarykey = dr("外置编码") '指定主键,只要是能唯一区分行的列即可,并非一定要表的实际主键.
'.PageNumber = page '设置页码 加密
For Each sr As DataRow In srs
With .Body.AddRow(sr("任务明细编号"),sr("任务明细名称"),sr("字段类型"))
'.AddCell(sr("数量") * sr("单价"))
.Primarykey = sr("_Identify") '为此行指定主键值
End With
Next
With wb.AddActionSheet("form1","menu")
.Add("mnudAdd", "增加明细").Attribute =""
End With
End With
js代码
function adddetail(Str){
location= Str + "adddetail?oid=" + form1.primarykey;
}
求助 .Primarykey = dr("外置编码") 点击增加明细的时候 .Primarykey 没有传递到下一个表函数里面,地址显示如下
http://127.0.0.1:8001/renwumingxiadddetail?oid=undefined
主键是表格的,不是表单的
location= Str + "adddetail?oid=" + detailtable.primarykey;