|
|
@@ -6,7 +6,9 @@ import javafx.fxml.FXML;
|
|
|
import javafx.scene.control.*;
|
|
|
import javafx.scene.control.cell.PropertyValueFactory;
|
|
|
import javafx.scene.control.TextArea;
|
|
|
+import javafx.scene.layout.HBox;
|
|
|
import space.anyi.client.App;
|
|
|
+import space.anyi.client.service.AiService;
|
|
|
import space.anyi.client.service.BookService;
|
|
|
import space.anyi.client.service.StatisticsService;
|
|
|
import space.anyi.client.service.TransactionService;
|
|
|
@@ -19,9 +21,12 @@ import space.anyi.common.entity.Book;
|
|
|
import space.anyi.common.entity.TransactionRecord;
|
|
|
import space.anyi.common.entity.User;
|
|
|
import space.anyi.common.dto.DeptSalesDTO;
|
|
|
+import space.anyi.common.dto.RegisterRequest;
|
|
|
import space.anyi.common.dto.HotBookDTO;
|
|
|
import space.anyi.common.dto.DeptDiscountDTO;
|
|
|
+import space.anyi.common.dto.SalesRecordDTO;
|
|
|
import space.anyi.common.dto.StatisticsSummary;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.List;
|
|
|
|
|
|
public class MainController {
|
|
|
@@ -68,6 +73,8 @@ public class MainController {
|
|
|
@FXML private TableColumn<Book, String> myBookTitleCol;
|
|
|
@FXML private TableColumn<Book, java.math.BigDecimal> myBookPriceCol;
|
|
|
@FXML private TableColumn<Book, Integer> myBookStockCol;
|
|
|
+ @FXML private TitledPane bookFormPane;
|
|
|
+ @FXML private Button saveBookBtn;
|
|
|
@FXML private TextField newTitle;
|
|
|
@FXML private TextField newAuthor;
|
|
|
@FXML private TextField newCategory;
|
|
|
@@ -93,6 +100,14 @@ public class MainController {
|
|
|
// Admin tab
|
|
|
@FXML private Tab adminTab;
|
|
|
@FXML private TableView<User> userTable;
|
|
|
+ @FXML private TitledPane userFormPane;
|
|
|
+ @FXML private Button saveUserBtn;
|
|
|
+ @FXML private TextField adminUsername;
|
|
|
+ @FXML private PasswordField adminPassword;
|
|
|
+ @FXML private TextField adminNickname;
|
|
|
+ @FXML private TextField adminEmail;
|
|
|
+ @FXML private TextField adminPhone;
|
|
|
+ @FXML private TextField adminDept;
|
|
|
@FXML private TableColumn<User, Integer> userIdCol;
|
|
|
@FXML private TableColumn<User, String> userNameCol;
|
|
|
@FXML private TableColumn<User, String> userNicknameCol;
|
|
|
@@ -100,6 +115,20 @@ public class MainController {
|
|
|
@FXML private TableColumn<User, Integer> userCreditCol;
|
|
|
@FXML private TableColumn<User, Integer> userRoleCol;
|
|
|
@FXML private TableColumn<User, Integer> userSellerCol;
|
|
|
+ @FXML private TableView<Book> adminBookTable;
|
|
|
+ @FXML private TableColumn<Book, Integer> adminBookIdCol;
|
|
|
+ @FXML private TableColumn<Book, String> adminBookTitleCol;
|
|
|
+ @FXML private TableColumn<Book, String> adminBookAuthorCol;
|
|
|
+ @FXML private TableColumn<Book, String> adminBookCategoryCol;
|
|
|
+ @FXML private TableColumn<Book, java.math.BigDecimal> adminBookPriceCol;
|
|
|
+ @FXML private TableColumn<Book, Integer> adminBookStockCol;
|
|
|
+ @FXML private TableColumn<Book, Integer> adminBookSellerCol;
|
|
|
+ @FXML private TableView<Book> pendingBookTable;
|
|
|
+ @FXML private TableColumn<Book, Integer> pendingBookIdCol;
|
|
|
+ @FXML private TableColumn<Book, String> pendingBookTitleCol;
|
|
|
+ @FXML private TableColumn<Book, String> pendingBookAuthorCol;
|
|
|
+ @FXML private TableColumn<Book, Integer> pendingBookSellerCol;
|
|
|
+ @FXML private TableColumn<Book, java.math.BigDecimal> pendingBookPriceCol;
|
|
|
@FXML private TableView<TransactionRecord> allTransTable;
|
|
|
@FXML private TableColumn<TransactionRecord, Integer> allTransIdCol;
|
|
|
@FXML private TableColumn<TransactionRecord, Integer> allTransBookIdCol;
|
|
|
@@ -107,13 +136,17 @@ public class MainController {
|
|
|
@FXML private TableColumn<TransactionRecord, Integer> allTransNumCol;
|
|
|
@FXML private TableColumn<TransactionRecord, java.math.BigDecimal> allTransPriceCol;
|
|
|
@FXML private TableColumn<TransactionRecord, String> allTransTimeCol;
|
|
|
+ @FXML private TextArea analysisResult;
|
|
|
|
|
|
private final BookService bookService = new BookService();
|
|
|
+ private final AiService aiService = new AiService();
|
|
|
private final TransactionService transactionService = new TransactionService();
|
|
|
private final UserService userService = new UserService();
|
|
|
private final StatisticsService statisticsService = new StatisticsService();
|
|
|
|
|
|
private Book selectedBook;
|
|
|
+ private Book editingBook;
|
|
|
+ private User editingUser;
|
|
|
|
|
|
@FXML
|
|
|
public void initialize() {
|
|
|
@@ -196,6 +229,20 @@ public class MainController {
|
|
|
userRoleCol.setCellValueFactory(new PropertyValueFactory<>("role"));
|
|
|
userSellerCol.setCellValueFactory(new PropertyValueFactory<>("isSeller"));
|
|
|
|
|
|
+ adminBookIdCol.setCellValueFactory(new PropertyValueFactory<>("bookId"));
|
|
|
+ adminBookTitleCol.setCellValueFactory(new PropertyValueFactory<>("title"));
|
|
|
+ adminBookAuthorCol.setCellValueFactory(new PropertyValueFactory<>("author"));
|
|
|
+ adminBookCategoryCol.setCellValueFactory(new PropertyValueFactory<>("category"));
|
|
|
+ adminBookPriceCol.setCellValueFactory(new PropertyValueFactory<>("sellingPrice"));
|
|
|
+ adminBookStockCol.setCellValueFactory(new PropertyValueFactory<>("stock"));
|
|
|
+ adminBookSellerCol.setCellValueFactory(new PropertyValueFactory<>("sellerId"));
|
|
|
+
|
|
|
+ pendingBookIdCol.setCellValueFactory(new PropertyValueFactory<>("bookId"));
|
|
|
+ pendingBookTitleCol.setCellValueFactory(new PropertyValueFactory<>("title"));
|
|
|
+ pendingBookAuthorCol.setCellValueFactory(new PropertyValueFactory<>("author"));
|
|
|
+ pendingBookSellerCol.setCellValueFactory(new PropertyValueFactory<>("sellerId"));
|
|
|
+ pendingBookPriceCol.setCellValueFactory(new PropertyValueFactory<>("sellingPrice"));
|
|
|
+
|
|
|
allTransIdCol.setCellValueFactory(new PropertyValueFactory<>("transId"));
|
|
|
allTransBookIdCol.setCellValueFactory(new PropertyValueFactory<>("bookId"));
|
|
|
allTransBuyerIdCol.setCellValueFactory(new PropertyValueFactory<>("buyerId"));
|
|
|
@@ -283,25 +330,67 @@ public class MainController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @FXML
|
|
|
+ private void handleEditBook() {
|
|
|
+ Book sel = myBookTable.getSelectionModel().getSelectedItem();
|
|
|
+ if (sel == null) {
|
|
|
+ showAlert("请先选择要编辑的书籍");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ editingBook = sel;
|
|
|
+ newTitle.setText(sel.getTitle());
|
|
|
+ newAuthor.setText(sel.getAuthor());
|
|
|
+ newCategory.setText(sel.getCategory());
|
|
|
+ newOriginalPrice.setText(sel.getOriginalPrice().toString());
|
|
|
+ newSellingPrice.setText(sel.getSellingPrice().toString());
|
|
|
+ newStock.setText(String.valueOf(sel.getStock()));
|
|
|
+ bookFormPane.setText("编辑书籍");
|
|
|
+ saveBookBtn.setText("保存修改");
|
|
|
+ bookFormPane.setExpanded(true);
|
|
|
+ }
|
|
|
+
|
|
|
@FXML
|
|
|
private void handleAddBook() {
|
|
|
try {
|
|
|
- Book book = new Book();
|
|
|
- book.setSellerId(LoginUserHolder.get().getUserid());
|
|
|
- book.setTitle(newTitle.getText().trim());
|
|
|
- book.setAuthor(newAuthor.getText().trim());
|
|
|
- book.setCategory(newCategory.getText().trim());
|
|
|
- book.setOriginalPrice(new java.math.BigDecimal(newOriginalPrice.getText().trim()));
|
|
|
- book.setSellingPrice(new java.math.BigDecimal(newSellingPrice.getText().trim()));
|
|
|
- book.setStock(Integer.parseInt(newStock.getText().trim()));
|
|
|
-
|
|
|
- R<Book> result = bookService.create(book);
|
|
|
- if (result.getCode() == 200) {
|
|
|
- showInfo("书籍已上架!");
|
|
|
- clearBookForm();
|
|
|
- handleLoadMyBooks();
|
|
|
+ String title = newTitle.getText().trim();
|
|
|
+ String author = newAuthor.getText().trim();
|
|
|
+ String category = newCategory.getText().trim();
|
|
|
+ BigDecimal originalPrice = new BigDecimal(newOriginalPrice.getText().trim());
|
|
|
+ BigDecimal sellingPrice = new BigDecimal(newSellingPrice.getText().trim());
|
|
|
+ int stock = Integer.parseInt(newStock.getText().trim());
|
|
|
+
|
|
|
+ if (editingBook != null) {
|
|
|
+ editingBook.setTitle(title);
|
|
|
+ editingBook.setAuthor(author);
|
|
|
+ editingBook.setCategory(category);
|
|
|
+ editingBook.setOriginalPrice(originalPrice);
|
|
|
+ editingBook.setSellingPrice(sellingPrice);
|
|
|
+ editingBook.setStock(stock);
|
|
|
+ R<Book> result = bookService.update(editingBook.getBookId(), editingBook);
|
|
|
+ if (result.getCode() == 200) {
|
|
|
+ showInfo("书籍已更新!");
|
|
|
+ clearBookForm();
|
|
|
+ handleLoadMyBooks();
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
} else {
|
|
|
- showAlert(result.getMessage());
|
|
|
+ Book book = new Book();
|
|
|
+ book.setSellerId(LoginUserHolder.get().getUserid());
|
|
|
+ book.setTitle(title);
|
|
|
+ book.setAuthor(author);
|
|
|
+ book.setCategory(category);
|
|
|
+ book.setOriginalPrice(originalPrice);
|
|
|
+ book.setSellingPrice(sellingPrice);
|
|
|
+ book.setStock(stock);
|
|
|
+ R<Book> result = bookService.create(book);
|
|
|
+ if (result.getCode() == 200) {
|
|
|
+ showInfo("书籍已上架!");
|
|
|
+ clearBookForm();
|
|
|
+ handleLoadMyBooks();
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
showAlert("输入无效:" + e.getMessage());
|
|
|
@@ -324,6 +413,38 @@ public class MainController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @FXML
|
|
|
+ private void handleViewSales() {
|
|
|
+ Book sel = myBookTable.getSelectionModel().getSelectedItem();
|
|
|
+ if (sel == null) {
|
|
|
+ showAlert("请先选择要查看的书籍");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ R<List<SalesRecordDTO>> result = bookService.getSales(sel.getBookId());
|
|
|
+ if (result.getCode() != 200 || result.getData() == null || result.getData().isEmpty()) {
|
|
|
+ showInfo("暂无销售记录");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Dialog<Void> dialog = new Dialog<>();
|
|
|
+ dialog.setTitle("销售记录 - " + sel.getTitle());
|
|
|
+ dialog.getDialogPane().setPrefSize(600, 400);
|
|
|
+ TableView<SalesRecordDTO> table = new TableView<>();
|
|
|
+ TableColumn<SalesRecordDTO, String> buyerCol = new TableColumn<>("买家");
|
|
|
+ buyerCol.setCellValueFactory(new PropertyValueFactory<>("buyerName"));
|
|
|
+ TableColumn<SalesRecordDTO, Integer> qtyCol = new TableColumn<>("数量");
|
|
|
+ qtyCol.setCellValueFactory(new PropertyValueFactory<>("quantity"));
|
|
|
+ TableColumn<SalesRecordDTO, BigDecimal> priceCol = new TableColumn<>("总价");
|
|
|
+ priceCol.setCellValueFactory(new PropertyValueFactory<>("totalPrice"));
|
|
|
+ TableColumn<SalesRecordDTO, String> timeCol = new TableColumn<>("时间");
|
|
|
+ timeCol.setCellValueFactory(new PropertyValueFactory<>("transactionTime"));
|
|
|
+ timeCol.setPrefWidth(200);
|
|
|
+ table.getColumns().addAll(buyerCol, qtyCol, priceCol, timeCol);
|
|
|
+ table.setItems(FXCollections.observableArrayList(result.getData()));
|
|
|
+ dialog.getDialogPane().setContent(table);
|
|
|
+ dialog.getDialogPane().getButtonTypes().add(ButtonType.CLOSE);
|
|
|
+ dialog.showAndWait();
|
|
|
+ }
|
|
|
+
|
|
|
// Statistics handlers
|
|
|
|
|
|
@FXML
|
|
|
@@ -365,6 +486,115 @@ public class MainController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @FXML
|
|
|
+ private void handleEditUser() {
|
|
|
+ User sel = userTable.getSelectionModel().getSelectedItem();
|
|
|
+ if (sel == null) {
|
|
|
+ showAlert("请先选择要编辑的用户");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ editingUser = sel;
|
|
|
+ adminUsername.setText(sel.getUsername());
|
|
|
+ adminPassword.setText(sel.getPassword());
|
|
|
+ adminNickname.setText(sel.getNickname());
|
|
|
+ adminEmail.setText(sel.getEmail());
|
|
|
+ adminPhone.setText(sel.getPhone());
|
|
|
+ adminDept.setText(sel.getDept());
|
|
|
+ userFormPane.setText("编辑用户");
|
|
|
+ saveUserBtn.setText("保存修改");
|
|
|
+ userFormPane.setExpanded(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @FXML
|
|
|
+ private void handleResetPassword() {
|
|
|
+ User sel = userTable.getSelectionModel().getSelectedItem();
|
|
|
+ if (sel == null) {
|
|
|
+ showAlert("请先选择要重置密码的用户");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ sel.setPassword("123456");
|
|
|
+ R<User> result = userService.update(sel.getUserid(), sel);
|
|
|
+ if (result.getCode() == 200) {
|
|
|
+ showInfo("密码已重置为 123456");
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @FXML
|
|
|
+ private void handleEditCredit() {
|
|
|
+ User sel = userTable.getSelectionModel().getSelectedItem();
|
|
|
+ if (sel == null) {
|
|
|
+ showAlert("请先选择要修改信用分的用户");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ TextInputDialog dialog = new TextInputDialog(String.valueOf(sel.getCredit()));
|
|
|
+ dialog.setTitle("修改信用分");
|
|
|
+ dialog.setHeaderText("用户:" + sel.getUsername());
|
|
|
+ dialog.setContentText("信用分:");
|
|
|
+ dialog.showAndWait().ifPresent(input -> {
|
|
|
+ try {
|
|
|
+ int credit = Integer.parseInt(input.trim());
|
|
|
+ sel.setCredit(credit);
|
|
|
+ R<User> result = userService.update(sel.getUserid(), sel);
|
|
|
+ if (result.getCode() == 200) {
|
|
|
+ showInfo("信用分已更新");
|
|
|
+ handleLoadAllUsers();
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ showAlert("请输入有效数字");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ @FXML
|
|
|
+ private void handleSaveUser() {
|
|
|
+ try {
|
|
|
+ String username = adminUsername.getText().trim();
|
|
|
+ String password = adminPassword.getText().trim();
|
|
|
+ if (username.isEmpty() || password.isEmpty()) {
|
|
|
+ showAlert("用户名和密码为必填项");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (editingUser != null) {
|
|
|
+ editingUser.setUsername(username);
|
|
|
+ editingUser.setPassword(password);
|
|
|
+ editingUser.setNickname(adminNickname.getText().trim());
|
|
|
+ editingUser.setEmail(adminEmail.getText().trim());
|
|
|
+ editingUser.setPhone(adminPhone.getText().trim());
|
|
|
+ editingUser.setDept(adminDept.getText().trim());
|
|
|
+ R<User> result = userService.update(editingUser.getUserid(), editingUser);
|
|
|
+ if (result.getCode() == 200) {
|
|
|
+ showInfo("用户信息已更新");
|
|
|
+ clearUserForm();
|
|
|
+ handleLoadAllUsers();
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ RegisterRequest req = new RegisterRequest();
|
|
|
+ req.setUsername(username);
|
|
|
+ req.setPassword(password);
|
|
|
+ req.setNickname(adminNickname.getText().trim());
|
|
|
+ req.setEmail(adminEmail.getText().trim());
|
|
|
+ req.setPhone(adminPhone.getText().trim());
|
|
|
+ req.setDept(adminDept.getText().trim());
|
|
|
+ R<User> result = userService.register(req);
|
|
|
+ if (result.getCode() == 200) {
|
|
|
+ showInfo("用户已添加");
|
|
|
+ clearUserForm();
|
|
|
+ handleLoadAllUsers();
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ showAlert("输入无效:" + e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@FXML
|
|
|
private void handleDeleteUser() {
|
|
|
User sel = userTable.getSelectionModel().getSelectedItem();
|
|
|
@@ -381,6 +611,70 @@ public class MainController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @FXML
|
|
|
+ private void handleLoadAllBooksAdmin() {
|
|
|
+ R<List<Book>> result = bookService.listAll();
|
|
|
+ if (result.getCode() == 200 && result.getData() != null) {
|
|
|
+ adminBookTable.setItems(FXCollections.observableArrayList(result.getData()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @FXML
|
|
|
+ private void handleDeleteBookAdmin() {
|
|
|
+ Book sel = adminBookTable.getSelectionModel().getSelectedItem();
|
|
|
+ if (sel == null) {
|
|
|
+ showAlert("请选择要删除的书籍");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ R<Void> result = bookService.delete(sel.getBookId());
|
|
|
+ if (result.getCode() == 200) {
|
|
|
+ showInfo("书籍已删除");
|
|
|
+ handleLoadAllBooksAdmin();
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @FXML
|
|
|
+ private void handleLoadPendingBooks() {
|
|
|
+ R<List<Book>> result = bookService.getPendingBooks();
|
|
|
+ if (result.getCode() == 200 && result.getData() != null) {
|
|
|
+ pendingBookTable.setItems(FXCollections.observableArrayList(result.getData()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @FXML
|
|
|
+ private void handleApproveBook() {
|
|
|
+ Book sel = pendingBookTable.getSelectionModel().getSelectedItem();
|
|
|
+ if (sel == null) {
|
|
|
+ showAlert("请先选择待审核的书籍");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ R<Book> result = bookService.audit(sel.getBookId(), 1);
|
|
|
+ if (result.getCode() == 200) {
|
|
|
+ showInfo("书籍已审核通过");
|
|
|
+ handleLoadPendingBooks();
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @FXML
|
|
|
+ private void handleRejectBook() {
|
|
|
+ Book sel = pendingBookTable.getSelectionModel().getSelectedItem();
|
|
|
+ if (sel == null) {
|
|
|
+ showAlert("请先选择待审核的书籍");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ R<Book> result = bookService.audit(sel.getBookId(), 2);
|
|
|
+ if (result.getCode() == 200) {
|
|
|
+ showInfo("书籍已拒绝");
|
|
|
+ handleLoadPendingBooks();
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@FXML
|
|
|
private void handleLoadAllTransactions() {
|
|
|
R<PageResult<TransactionRecord>> result = HttpClientUtil.get("/api/transaction?page=1&size=100",
|
|
|
@@ -406,6 +700,16 @@ public class MainController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @FXML
|
|
|
+ private void handleGenerateAnalysis() {
|
|
|
+ R<String> result = aiService.getAnalysis();
|
|
|
+ if (result.getCode() == 200 && result.getData() != null) {
|
|
|
+ analysisResult.setText(result.getData());
|
|
|
+ } else {
|
|
|
+ showAlert(result.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@FXML
|
|
|
private void handleLogout() {
|
|
|
LoginUserHolder.clear();
|
|
|
@@ -426,12 +730,29 @@ public class MainController {
|
|
|
}
|
|
|
|
|
|
private void clearBookForm() {
|
|
|
+ editingBook = null;
|
|
|
newTitle.clear();
|
|
|
newAuthor.clear();
|
|
|
newCategory.clear();
|
|
|
newOriginalPrice.clear();
|
|
|
newSellingPrice.clear();
|
|
|
newStock.clear();
|
|
|
+ bookFormPane.setText("添加新书");
|
|
|
+ saveBookBtn.setText("添加书籍");
|
|
|
+ bookFormPane.setExpanded(false);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void clearUserForm() {
|
|
|
+ editingUser = null;
|
|
|
+ adminUsername.clear();
|
|
|
+ adminPassword.clear();
|
|
|
+ adminNickname.clear();
|
|
|
+ adminEmail.clear();
|
|
|
+ adminPhone.clear();
|
|
|
+ adminDept.clear();
|
|
|
+ userFormPane.setText("添加用户");
|
|
|
+ saveUserBtn.setText("保存");
|
|
|
+ userFormPane.setExpanded(false);
|
|
|
}
|
|
|
|
|
|
private void showAlert(String message) {
|