viewModel.get("button5qj") && viewModel.get("button5qj").on("click", function(data) { // 按钮--单击 let id = viewModel.get("detailEntityList").getRow(data.index).id; var params = { id: id, }; // 网络请求 var proxy = cb.rest.DynamicProxy.create({ ensure: { url: "/getDeliverySupPlan/getDeliverySupPlanId", method: "POST", options: { mask: false, domainKey: "procurement", }, params, }, }); proxy.ensure(params, function(err, result) { console.log("success", result); if (err) { return cb.utils.alert(err.message || "驳回失败", "error"); } else { if (result.pk_id) { debugger; jDiwork.openService( "ycSaleOrder", {}, { title: "交期计划(供应商)", code: "9057a243-79b5-41at-b265-f597a0558ta5", // 自定义一个唯一编码,用于 url: "/mdf-node/meta/Voucher/2ee6a307/" + result.pk_id + "?domainKey=procurement", } ); } else { return cb.utils.alert("此订单没有做交期管理", "error"); } } }); });
标签:跨域,get,cb,viewModel,弹框,params,result,跳转,id From: https://www.cnblogs.com/LFxanla/p/17392255.html