⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stockmanagementmainframe.java

📁 一个使用java 写的进销存代码 使用了ejb 等技术 是学习j2ee的好
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
      }else{
        //取得进货模块的用户权限
        int stockFunction = user.getStockFunction();
        if((stockFunction & 128) != 128){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(stockAccountEntryCheckFrame == null){
          stockAccountEntryCheckFrame = new StockAccountEntryCheckFrame(this);
          //使窗口居中对齐
          setCenterPosition(stockAccountEntryCheckFrame);
          stockAccountEntryCheckFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          stockAccountEntryCheckFrame.setUser(user);
          stockAccountEntryCheckFrame.setLedgerDate(ledgerDate);
          stockAccountEntryCheckFrame.setVisible(true);
        }
      }
      stockAccountEntryCheckFrame.setTitle("审核进货会计分录窗口"+ ":用户("
                             + user.getUserName() + "):账套(" + ledgerDate + ")");
    }
    else if (actionCommand.equals("stockAccountEntryCreate")) {
      if(user == null){
        JOptionPane.showMessageDialog(null, "先登陆系统,再打开编写进货会计分录窗口.");
        return;
      }else{
        //取得进货模块的用户权限
        int stockFunction = user.getStockFunction();
        if((stockFunction & 128) != 128){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(stockAccountEntryCreateFrame == null){
          stockAccountEntryCreateFrame = new StockAccountEntryCreateFrame(this);
          //使窗口居中对齐
          setCenterPosition(stockAccountEntryCreateFrame);
          stockAccountEntryCreateFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          stockAccountEntryCreateFrame.setUser(user);
          stockAccountEntryCreateFrame.setLedgerDate(ledgerDate);
          stockAccountEntryCreateFrame.setVisible(true);
        }
      }
      stockAccountEntryCreateFrame.setTitle("编写进货会计分录窗口"+ ":用户("
                             + user.getUserName() + "):账套(" + ledgerDate + ")");
    }
    else if (actionCommand.equals("stockAccountEntrySearch")) {
      if(user == null){
        JOptionPane.showMessageDialog(null, "先登陆系统,再打开查询进货会计分录窗口.");
        return;
      }else{
        //取得进货模块的用户权限
        int stockFunction = user.getStockFunction();
        if((stockFunction & 256) != 256){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(stockAccountEntrySearchFrame == null){
          stockAccountEntrySearchFrame = new StockAccountEntrySearchFrame(this);
          //使窗口居中对齐
          setCenterPosition(stockAccountEntrySearchFrame);
          stockAccountEntrySearchFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          stockAccountEntrySearchFrame.setUser(user);
          stockAccountEntrySearchFrame.setLedgerDate(ledgerDate);
          stockAccountEntrySearchFrame.setVisible(true);
        }
      }
      stockAccountEntrySearchFrame.setTitle("查询进货会计分录窗口"+ ":用户("
                             + user.getUserName() + "):账套(" + ledgerDate + ")");
    }
    else if (actionCommand.equals("stockTransferSubmit")) {
      if(user == null){
        JOptionPane.showMessageDialog(null, "先登陆系统,再打开商品调出窗口.");
        return;
      }else{
        //取得库存模块的用户权限
        int stockManageFunction = user.getStockManageFunction();
        if((stockManageFunction & 1) != 1){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(stockTransferSubmitFrame == null){
          stockTransferSubmitFrame = new StockTransferSubmitFrame(this);
          //使窗口居中对齐
          setCenterPosition(stockTransferSubmitFrame);
          stockTransferSubmitFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          stockTransferSubmitFrame.setUser(user);
          stockTransferSubmitFrame.setLedgerDate(ledgerDate);
          stockTransferSubmitFrame.setVisible(true);
        }
      }
      stockTransferSubmitFrame.setTitle("商品调出窗口"+ ":用户("
                             + user.getUserName() + "):账套(" + ledgerDate + ")");
    }
    else if (actionCommand.equals("stockTransferCheck")) {
      if(user == null){
        JOptionPane.showMessageDialog(null, "先登陆系统,再打开商品验收窗口.");
        return;
      }else{
        //取得库存模块的用户权限
        int stockManageFunction = user.getStockManageFunction();
        if((stockManageFunction & 2) != 2){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(stockTransferCheckFrame == null){
          stockTransferCheckFrame = new StockTransferCheckFrame(this);
          //使窗口居中对齐
          setCenterPosition(stockTransferCheckFrame);
          stockTransferCheckFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          stockTransferCheckFrame.setUser(user);
          stockTransferCheckFrame.setLedgerDate(ledgerDate);
          stockTransferCheckFrame.setVisible(true);
        }
      }
      stockTransferCheckFrame.setTitle("商品验收窗口"+ ":用户("
                             + user.getUserName() + "):账套(" + ledgerDate + ")");
    }
    else if (actionCommand.equals("goodsPriceManage")) {
      if(user == null){
        JOptionPane.showMessageDialog(null, "先登陆系统,再打开商品调价窗口.");
        return;
      }else{
        //取得库存模块的用户权限
        int stockManageFunction = user.getStockManageFunction();
        if((stockManageFunction & 4) != 4){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(goodsPriceManageFrame == null){
          goodsPriceManageFrame = new GoodsPriceManageFrame(this);
          //使窗口居中对齐
          setCenterPosition(goodsPriceManageFrame);
          goodsPriceManageFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          goodsPriceManageFrame.setUser(user);
          goodsPriceManageFrame.setLedgerDate(ledgerDate);
          goodsPriceManageFrame.setVisible(true);
          //显示商品类别
          goodsPriceManageFrame.showAllCategories();
        }
      }
      goodsPriceManageFrame.setTitle("商品调价窗口"+ ":用户("
                             + user.getUserName() + "):账套(" + ledgerDate + ")");
    }
    else if (actionCommand.equals("goodsQuantitySplit")) {
      if(user == null){
        JOptionPane.showMessageDialog(null, "先登陆系统,再打开商品数量分拆窗口.");
        return;
      }else{
        //取得库存模块的用户权限
        int stockManageFunction = user.getStockManageFunction();
        if((stockManageFunction & 8) != 8){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(goodsQuantitySplitFrame == null){
          goodsQuantitySplitFrame = new GoodsQuantitySplitFrame(this);
          //使窗口居中对齐
          setCenterPosition(goodsQuantitySplitFrame);
          goodsQuantitySplitFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          goodsQuantitySplitFrame.setUser(user);
          goodsQuantitySplitFrame.setLedgerDate(ledgerDate);
          goodsQuantitySplitFrame.setVisible(true);
        }
      }
      goodsQuantitySplitFrame.setTitle("商品数量分拆窗口"+ ":用户("
                             + user.getUserName() + "):账套(" + ledgerDate + ")");
    }
    else if (actionCommand.equals("goodsQuantityCombine")) {
      if(user == null){
        JOptionPane.showMessageDialog(null, "先登陆系统,再打开商品数量组合窗口.");
        return;
      }else{
        //取得库存模块的用户权限
        int stockManageFunction = user.getStockManageFunction();
        if((stockManageFunction & 8) != 8){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(goodsQuantityCombineFrame == null){
          goodsQuantityCombineFrame = new GoodsQuantityCombineFrame(this);
          //使窗口居中对齐
          setCenterPosition(goodsQuantityCombineFrame);
          goodsQuantityCombineFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          goodsQuantityCombineFrame.setUser(user);
          goodsQuantityCombineFrame.setLedgerDate(ledgerDate);
          goodsQuantityCombineFrame.setVisible(true);
        }
      }
      goodsQuantityCombineFrame.setTitle("商品数量组合窗口"+ ":用户("
                             + user.getUserName() + "):账套(" + ledgerDate + ")");
    }
    else if (actionCommand.equals("stocktakeSubmit")) {
      if(user == null){
        JOptionPane.showMessageDialog(null, "先登陆系统,再打开库存盘点计数窗口.");
        return;
      }else{
        //取得库存模块的用户权限
        int stockManageFunction = user.getStockManageFunction();
        if((stockManageFunction & 16) != 16){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(stocktakeSubmitFrame == null){
          stocktakeSubmitFrame = new StocktakeSubmitFrame(this);
          //使窗口居中对齐
          setCenterPosition(stocktakeSubmitFrame);
          stocktakeSubmitFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          stocktakeSubmitFrame.setUser(user);
          stocktakeSubmitFrame.setLedgerDate(ledgerDate);
          stocktakeSubmitFrame.setVisible(true);
        }
      }
      stocktakeSubmitFrame.setTitle("库存盘点计数窗口"+ ":用户("
                             + user.getUserName() + "):账套(" + ledgerDate + ")");
    }
    else if (actionCommand.equals("stocktakeCheck")) {
      if(user == null){
        JOptionPane.showMessageDialog(null, "先登陆系统,再打开库存盘点核查窗口.");
        return;
      }else{
        //取得库存模块的用户权限
        int stockManageFunction = user.getStockManageFunction();
        if((stockManageFunction & 32) != 32){
          JOptionPane.showMessageDialog(null, user.getUserName() + "用户不具有该权限.");
          return;
        }
        if(ledgerDate.length() == 0){
          JOptionPane.showMessageDialog(null, "请选择账套.");
          return;
        }
        if(stocktakeCheckFrame == null){
          stocktakeCheckFrame = new StocktakeCheckFrame(this);
          //使窗口居中对齐
          setCenterPosition(stocktakeCheckFrame);
          stocktakeCheckFrame.setVisible(true);
        }else{
          //重新传入用户类和账套
          stocktakeCheckFrame.setUser(user);
          stocktakeCheckFrame.setLedgerDate(ledgerDate);
          stocktakeCheckFrame.setVisible(true);
        }
      }
      stocktakeCheckFrame.setTitle("库存盘点核查窗口"+ ":用户("
                             + u

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -