function SS() { var en = new Entity("BP.Sys.GroupField"); en.FrmID = "dict_cc"; en.Lab = "xxxx"; en.Insert(); // http://localhost:2296/WF/Comm/Handler.ashx?DoType=Entity_Delete&EnName=&PKVal=Frm_GuanYongCeShi_RiQiZiDuan //var en = new Entity("BP.Sys.GroupField"); //en.Lab = "新建分组zzz"; //en.FrmID = "xxx"; //en.Idx = 1000; //en.Insert(); //var oid = en.OID; //var en = new Entity("BP.Sys.FrmUI.MapAttrDT", 'Frm_GuanYongCeShi_RiQiZiDuan'); //en.Delete(); //var en = new Entity("BP.Sys.MapAttr", 'Frm_GuanYongCeShi_RiQiZiDuan'); //var idx = en.Idx; //en.Delete(); //var en = new Entity("BP.Sys.FrmUI.MapAttrDT", 'Frm_GuanYongCeShi_RiQiZiDuan'); //en.Delete(); //var en = new Entity("BP.Sys.FrmUI.MapAttrString", 'Frm_GuanYongCeShi_RiQiZiDuan'); //en.Delete(); // 创建当前表单的实例. var workID = GetQueryString('WorkID'); //获得传入的实体ID. var frmID = GetQueryString('FrmID'); //获得传入的frmID // 获得主表信息. var en = new Entity(frmID, workID); //创建实例, 当前的en就是一个该实体的json. //获得从表配件信息. var enDtls = new Entities(frmID + "Dtl1"); enDtls.Retrieve("RefPK", workID); var JiaoFuRiQi = '2021-01-01'; //交付日期. var KaiGongShuLiang = 2; //开工数量. //产品实例. var chanPinEntity = new Entity("Dict_CPSL"); var chanPinEntityDtl = new Entity("Dict_CPSLDtl1"); //遍历数据生成订单信息. for (var i = 0; i < KaiGongShuLiang; i++) { //生成主表实例. chanPinEntity.CopyJSON(en); chanPinEntity.OID = 0; chanPinEntity.JiaoFuRiQi = JiaoFuRiQi; chanPinEntity.Insert(); //插入产品实力主表. //生成从表实例. for (var idx = 0; idx < enDtls.length; idx++) { var enDtl = enDtls[idx]; //生成步骤从表.. chanPinEntityDtl.CopyJSON(enDtl); chanPinEntityDtl.OID = 0; chanPinEntityDtl.RefPK = chanPinEntity.OID; chanPinEntityDtl.Insert(); //插入产品实力 dtl. } } alert("执行完成."); } $(document).ready(function () { var html = "
"; html += " | "; html += "驰骋官网"; html += "| 常见问题-主页-登录"; html += "| 帮助中心"; // html += "| 登录-注册-企业"; // html += "| 终端客户登录"; html += " | "; html += "
驰骋官网 | "; frmEndHtml += "流程学院 | "; frmEndHtml += "视频教程 | "; frmEndHtml += "操作手册 | "; frmEndHtml += "源代码下载 | "; frmEndHtml += "