datagrid中设置field链接   链接中通常传递的是int类型的ID字段,但是有时难免传递文本之类的参数

那可以添加 如下 :

field: 'batchImg', title: '质检报告', width: 60,
                        formatter: function (value, row, index) {
                            //商品ID
                        
                            //商品编码
                            var VCPRODUCTCODE = row.VCPRODUCTCODE;
                          
                            //批号
                            var VCBATCHNUMBER =row.VCBATCHNUMBER;
                      
                         //方式一、传递文本类型的参数(推荐方式)
                            return '<a href="#" + VCPRODUCTCODE+ '\',\''+VCBATCHNUMBER+'\')">查看</a>  ' 
                          
                       //方式二、传递数字类型的参数,如果以下参数为文本,则代码无效

                            //return "<a  href='javascript:showBatchImg(" + VCPRODUCTCODE + "," + VCBATCHNUMBER + ")'>扫描件</a>" +
                            //            "<img src='../../Content/JQEasyUI/themes/icons/pencil.png' />";



                        }