diff --git a/LibManagementSystem/borrow.cpp b/LibManagementSystem/borrow.cpp index 8599ef8ac8530dd87b41aff8c6bb072dde4529e5..08f80a4b1e324a52ef79e09f010979eb64425787 100644 --- a/LibManagementSystem/borrow.cpp +++ b/LibManagementSystem/borrow.cpp @@ -141,6 +141,9 @@ void borrow::fail_enter(QString failmsg) void borrow::receive_enter() { if(is_new){ + if(ui->name_edit->text() == borbookcut(user->appointedbook,1)){ + user->appointedbook = ""; + } //更新个人借书信息 QDate date=QDate::currentDate().addDays(+30); QString returnTime=date.toString("yyyy-MM-dd"); diff --git a/LibManagementSystem/mainwindow.cpp b/LibManagementSystem/mainwindow.cpp index 68c63dad97b38bd649b97563cbadabaf09a95195..653eb4caf6c87cc3e442952d16771d6e7f12c07c 100644 --- a/LibManagementSystem/mainwindow.cpp +++ b/LibManagementSystem/mainwindow.cpp @@ -286,6 +286,7 @@ void MainWindow::ifborcon() connect(client,&communication_module::msg_received,sea->w,&book_info::receive_infobor); connect(sea->w,&book_info::ifborcon,this,&MainWindow::ifborcon); connect(sea->w,&book_info::ifappcon,this,&MainWindow::ifappcon); + } void MainWindow::ifappcon() { @@ -299,7 +300,6 @@ void MainWindow::ifappcon() connect(client,&communication_module::msg_received,sea->w,&book_info::receive_infoapp); connect(sea->w,&book_info::ifborcon,this,&MainWindow::ifborcon); connect(sea->w,&book_info::ifappcon,this,&MainWindow::ifappcon); - connect(sea,&search::nw,this,&MainWindow::rw); } void MainWindow::user_infoC()