深圳全飞鸿

标题: 关于beacon的跳框/弹框方案 [打印本页]

作者: zhgc    时间: 2021-4-24 10:38
标题: 关于beacon的跳框/弹框方案
本帖最后由 zhgc 于 2022-8-28 23:32 编辑

<input name="layer[CUSTOMER_TEXT]" type="text" style="width:120px" value="ALL" readonly="readonly" id="CUSTOMER" class="text" OnMouseOver="showCondition(this)"

OnClick="GetCondition(this,'/sfc/S.php/nago/conditiondialog/?xmlfile=&reportid=CUSTOMER&id=CUSTOMER&mode=0&col=4&all=true&idcol=0&valuecol=1&hidecol=0')"  style="cursor:hand" />
<input name="layer[CUSTOMER]" id="CUSTOMER_Code" type="hidden" value="ALL" />








作者: zhgc    时间: 2021-4-24 10:53
方法1
<a href="" οnclick="fun()">我是a标签</a>
方法2
<a href="javascript:fun()">我是a标签</a>
方法3
<a id='fun' >我是a标签</a>
然后使用jq的方法通过id获取并设置点击函数:
$("#fun").click(function(){
     fun();


在block.nagoreport里可能看到:
                                if(array_key_exists($k,$report->Columns)){  //此时,不再支持index索引,只能用栏位名称
                                        if($report->Columns[$k]->visible){//如果栏位是可见的
                                                //link的处理
                                                $link=$report->Columns[$k]->link;
                                                if($link==""){
                                                         //$vv="<a href=11>{$vv}</a>";    //没有link的url
                                                }else{
                                                        $tmp=array_merge(array(), $item);
                                                        foreach($tmp as $kkk=>$vvv){
                                                                $link=str_replace("[".$kkk."]", $vvv, $link);
                                                        }       
                                                        $vv="<a href={$link} target=\"_blank\">{$vv}</a>";                                               
                                                }

那可能尝试这样改造:
<a href="javascript:fun()">
window.showModalDialog(strLink,"","center:yes;help:no;dialogWidth:600px;dialogHeight:400px;status:no;resizable:yes;");
<a href="javascript:window.showModalDialog(strLink,'','center:yes;help:no;dialogWidth:600px;dialogHeight:400px;status:no;resizable:yes;')">


作者: zhgc    时间: 2021-4-24 11:17
实测有效

                <fields>
                        <field name="WO" colname="rwr.WO" operator="=" location="STRSQL_WO" />'
                        <field name="PROCESS" colname="rwr.PROCESS_SIDE" operator="=" location="STRSQL_PROCESS" />
                </fields>
                <columns>
                        <column no="ROWID" visible="false" />
                        <column no="WO" title="工单号码" />
                        <column no="PROCESS_SIDE" title="面别" />
                        <column no="DELIVER_QTY11" title="实发数量" link="@R.php/k2/k2_07b/1?layerID=[ROWID]"  />
                        <column no="DELIVER_QTY" title="实发数量" link="javascript:window.showModalDialog('@R.php/k2/k2_07b/1?layerID=[ROWID]','','center:yes;help:no;dialogWidth:720px;dialogHeight:400px;status:no;resizable:yes;')"  />
                        <column no="CUST_KP_DESC" title="料号描述" />
                        <column no="CUST_KP_NO" link="@R.php/k2/k2_07a/1?layerKP=[CUST_KP_NO]#layerWO=[WO]" title="料号"  />       
                </columns>
                <templete>
                        report_003A
                </templete>
作者: zhgc    时间: 2021-4-24 14:15
  1.                 <script>
  2.                 if(window.showModalDialog == undefined){
  3.                         window.showModalDialog = function(url,mixedVar,features){
  4.                                 if(window.hasOpenWindow){
  5.                                         //alert("您已经打开了一个窗口!请先处理它");//避免多次点击会弹出多个窗口  
  6.                                         //window.myNewWindow.focus();
  7.                                         window.myNewWindow.close(); //直接关闭,重新开始
  8.                                 }
  9.                                 window.hasOpenWindow = true;
  10.                                 if(mixedVar) var mixedVar = mixedVar;
  11.                                 //因window.showmodaldialog 与 window.open 参数不一样,所以封装的时候用正则去格式化一下参数
  12.                                 if(features) var features = features.replace(/(dialog)|(px)/ig,"").replace(/;/g,',').replace(/\:/g,"=");
  13.                                 //window.open("Sample.htm",null,"height=200,width=400,status=yes,toolbar=no,menubar=no");
  14.                                 //window.showModalDialog("modal.htm",obj,"dialogWidth=200px;dialogHeight=100px");
  15.                                 var left = (window.screen.width - parseInt(features.match(/width[\s]*=[\s]*([\d]+)/i)[1]))/2;
  16.                                 var top = (window.screen.height - parseInt(features.match(/height[\s]*=[\s]*([\d]+)/i)[1]))/2;
  17.                                 window.myNewWindow = window.open(url,"_blank",features+",top="+top+",left="+left);
  18.                         }
  19.                 }
  20.                 </script>
  21.                 <style>
  22.                 A.sfcreporlink { TEXT-DECORATION: none; color: red }
  23.                 </style>
  24.                 <table border=0 width=100%><tr><td align=right>
  25.                 <a  class="sfcreporlink"
  26.                 href="javascript:window.showModalDialog('/sfc/R.php/setupsheet/rkp_list?layerWO=COMMON','','center:yes;help:no;dialogWidth:720px;dialogHeight:400px;status:no;resizable:yes;')" ><small>查看工单替代料报表</small></a>
  27.                 </td></tr></table>
复制代码
       




欢迎光临 深圳全飞鸿 (http://www.nagomes.com/disc/) Powered by Discuz! X3.2