• eas之列表界面写脚本时如何写sql


    var easNames = JavaImporter();
    easNames.importPackage(Packages.com.kingdee.bos.dao.query);
    with(easNames){
          var tblMain=pluginCtx.getKDTable("tblMain");
          var selectRows=com.kingdee.bos.ctrl.kdf.table.util.KDTableUtil.getSelectedRows(tblMain);
          for( var i=0; i<selectRows.length; i++)    {
          var id= tblMain.getCell(selectRows[i],"id").getValue();
    //                com.kingdee.eas.util.client.MsgBox.showInfo(id);
          var sqlcha=" select CFKDTEXTFIELD  from   T_AR_OtherBill        where fid ='"+id+"'  ";
           var aaaa=SQLExecutorFactory.getRemoteInstance(sqlcha).executeSQL( );
           var  CFKDTEXTFIELD="";
          var projectValue="";
          if(aaaa.next()){
        CFKDTEXTFIELD=aaaa.getString("CFKDTEXTFIELD");
    //                         com.kingdee.eas.util.client.MsgBox.showInfo( CFKDTEXTFIELD);
          projectValue=new javax.swing.JOptionPane.showInputDialog( null ,"请输入发票号:", CFKDTEXTFIELD);
          }else{
         projectValue = new javax.swing.JOptionPane.showInputDialog(null,"请输入发票号:","必康",javax.swing.JOptionPane.PLAIN_MESSAGE);
        }
         var sql="     update    T_AR_OtherBill set    CFKDTEXTFIELD='"+projectValue+"'      where fid ='"+id+"'  ";
         com.kingdee.eas.csinterface.syncdatabase.SQLFacadeFactory.getRemoteInstance().exeSQL(sql);
        }
        pluginCtx.getKDTable("tblMain").refresh();

       }

  • 相关阅读:
    d is undefined错误
    $ is not defined错误类型
    jsonp从服务器读取数据并且予以显示
    jquery来跨域提交表单
    json和jsonp的使用格式
    Compaction介绍
    mysql操作
    DNS安装配置
    FLUSH TABLES WITH READ LOCK 和 LOCK TABLES 之种种
    执行安装redis报错undefined reference to `__sync_add_and_fetch_4'
  • 原文地址:https://www.cnblogs.com/luojiabao/p/10987483.html
Copyright © 2020-2023  润新知