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();

   }

相关文章:

  • 2022-12-23
  • 2021-04-08
  • 2021-08-18
  • 2021-11-23
  • 2021-06-14
  • 2021-11-28
猜你喜欢
  • 2021-04-26
  • 2022-12-23
  • 2021-11-28
  • 2021-11-28
  • 2022-12-23
相关资源
相似解决方案