?? stockmanagementmainframe.java
字號:
}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 + -