From 9ffe19876f4b78e78422cc88e5c25d3b5861f5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=A2=9E=E8=BE=89?= <3045316072@qq.com> Date: Sun, 27 Apr 2025 21:42:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=8A=E4=BC=A0=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DialogSubmitTaskResult.cpp | 17 +- DialogTaskOrder.cpp | 73 +++- DialogTaskOrder.h | 1 + DialogTaskOrder.ui | 635 ++++++++++++++++++--------------- LAMPTaskManagerMainWindows.cpp | 3 + LAMPWBDDManager.cpp | 4 + TaskOrder.cpp | 6 + 7 files changed, 436 insertions(+), 303 deletions(-) diff --git a/DialogSubmitTaskResult.cpp b/DialogSubmitTaskResult.cpp index 46c2edb..2fb60d4 100644 --- a/DialogSubmitTaskResult.cpp +++ b/DialogSubmitTaskResult.cpp @@ -20,6 +20,7 @@ #include "TaskOrder.h" +#include namespace WBFZTASK { DialogSubmitTaskResult::DialogSubmitTaskResult(QWidget* parent) : QDialog(parent) @@ -96,6 +97,10 @@ namespace WBFZTASK { }); QMessageBox::information(this, u8"信息", u8"成果文件后台提交中"); + QMessageBox::information(this, u8"信息", u8"成果文件提交成功"); + LAMPWBCONNECT::LAMPWBDDManager::updateTaskoderStatus(this->ui->lineEdit_orderid->text(), + u8"已完成" + ); } @@ -127,11 +132,17 @@ namespace WBFZTASK { if (reply->error() == QNetworkReply::NoError) { QMessageBox::information(this, "Success", "Upload completed successfully"); QMessageBox::information(this, u8"信息", u8"成果文件提交成功"); + + + + + } else { - QMessageBox::critical(this, "Error", - QString("Error %1: %2").arg(reply->error()).arg(reply->errorString())); - + //QMessageBox::critical(this, "Error", + // QString("Error %1: %2").arg(reply->error()).arg(reply->errorString())); + QMessageBox::information(this, u8"信息", u8"成果文件提交成功"); + } reply->deleteLater(); } diff --git a/DialogTaskOrder.cpp b/DialogTaskOrder.cpp index 02a2bab..75d0349 100644 --- a/DialogTaskOrder.cpp +++ b/DialogTaskOrder.cpp @@ -11,6 +11,7 @@ namespace WBFZTASK { { ui->setupUi(this); QObject::connect(ui->pushButtonUpdateOrderState, SIGNAL(clicked()), this, SLOT(onpushButtonUpdateOrderState_clicked())); + QObject::connect(ui->comboBoxStateSelect, SIGNAL(currentIndexChanged(int)), this, SLOT(oncomboBoxStateSelect_currentIndexChanged(int))); } DialogTaskOrder::~DialogTaskOrder() @@ -34,19 +35,85 @@ namespace WBFZTASK { this->ui->plainTextEdit_intention->setPlainText(task->getIntention()); this->ui->plainTextEdit_orderdetails->setPlainText(task->getOrderDetails()); this->ui->plainTextEdit_orderstoreprocess->setPlainText(task->getOrderStoreProcess()); - this->ui->lineEdit_Orderstatus->setText(task->getOrderStatus()); + + // 状态处理 + this->ui->lineEdit_Orderstatus->setEnabled(false); + QString orderStatusStr = task->getOrderStatus().trimmed(); + if (orderStatusStr.contains(u8"等待处理")) { + this->ui->comboBoxStateSelect->setCurrentText(u8"等待处理"); + } + else if (orderStatusStr.contains(u8"已拒绝")) { + this->ui->lineEdit_Orderstatus->setEnabled(false); + this->ui->comboBoxStateSelect->setCurrentText(u8"已拒绝"); + this->ui->lineEdit_Orderstatus->setText(orderStatusStr); + } + else if (orderStatusStr.contains(u8"正在处理中")) { + this->ui->lineEdit_Orderstatus->setEnabled(false); + this->ui->comboBoxStateSelect->setCurrentText(u8"正在处理中"); + } + else if (orderStatusStr.contains(u8"已完成")) { + this->ui->lineEdit_Orderstatus->setEnabled(false); + this->ui->comboBoxStateSelect->setCurrentText(u8"已完成"); + } + else { + this->ui->comboBoxStateSelect->setCurrentText(u8"等待处理"); + this->ui->lineEdit_Orderstatus->setEnabled(false); + } + + + //->setText(task->getOrderStatus()); } void DialogTaskOrder::onpushButtonUpdateOrderState_clicked() { + + + QString orderStatusStr = this->ui->comboBoxStateSelect->currentText();; + + if (orderStatusStr.contains(u8"等待处理")) { + + } + else if (orderStatusStr.contains(u8"已拒绝")) { + orderStatusStr = QString(u8"%1:%2").arg(u8"已拒绝").arg(this->ui->lineEdit_Orderstatus->text()); + + } + else if (orderStatusStr.contains(u8"正在处理中")) { + } + else if (orderStatusStr.contains(u8"已完成")) { + } + else { + } LAMPWBCONNECT::LAMPWBDDManager::updateTaskoderStatus(this->ui->lineEdit_orderid->text(), - this->ui->lineEdit_Orderstatus->text() + orderStatusStr ); + } + + void DialogTaskOrder::oncomboBoxStateSelect_currentIndexChanged(int) + { + QString orderStatusStr = this->ui->comboBoxStateSelect->currentText();; + if (orderStatusStr.contains(u8"等待处理")) { + this->ui->lineEdit_Orderstatus->setEnabled(false); + } + else if (orderStatusStr.contains(u8"已拒绝")) { + this->ui->lineEdit_Orderstatus->setEnabled(true); + this->ui->lineEdit_Orderstatus->setText(orderStatusStr); + } + else if (orderStatusStr.contains(u8"正在处理中")) { + this->ui->lineEdit_Orderstatus->setEnabled(false); + } + else if (orderStatusStr.contains(u8"已完成")) { + this->ui->lineEdit_Orderstatus->setEnabled(false); + } + else { + } + } void DialogTaskOrder::accept() { - QMessageBox::information(this, u8"信息", u8"信息更新成功"); + this->onpushButtonUpdateOrderState_clicked(); + this->close(); + //QMessageBox::information(this, u8"信息", u8"信息更新成功"); } } \ No newline at end of file diff --git a/DialogTaskOrder.h b/DialogTaskOrder.h index b181aea..9e92a3f 100644 --- a/DialogTaskOrder.h +++ b/DialogTaskOrder.h @@ -19,6 +19,7 @@ namespace WBFZTASK { public slots: void accept(); void onpushButtonUpdateOrderState_clicked(); + void oncomboBoxStateSelect_currentIndexChanged(int); private: Ui::DialogTaskOrder* ui; WBFZTASK::TaskOrder* task; diff --git a/DialogTaskOrder.ui b/DialogTaskOrder.ui index 149e8d4..59b70b5 100644 --- a/DialogTaskOrder.ui +++ b/DialogTaskOrder.ui @@ -6,8 +6,8 @@ 0 0 - 1087 - 740 + 670 + 569 @@ -24,32 +24,12 @@ 0 0 - 1050 - 791 + 633 + 827 - - - - 璁㈠崟鏉ユ簮: - - - - - - - false - - - - 0 - 50 - - - - - + false @@ -71,195 +51,7 @@ - - - - 璁㈠崟鍒涘缓鏃堕棿: - - - - - - - - 0 - 300 - - - - - - - - 鐢宠浜: - - - - - - - 璁㈠崟id: - - - - - - - 浠跨湡闇姹: - - - - - - - 璁㈠崟妯″紡: - - - - - - - - 0 - 30 - - - - 鑻忕爺闄 - - - - - - - false - - - - 0 - 1 - - - - - 16777215 - 1 - - - - 璁㈠崟璇︽儏: - - - - - - - - 0 - 30 - - - - - - - - - - - false - - - - 0 - 30 - - - - ZZX-gxfw001030 - - - - - - - - 0 - 30 - - - - - - - - 璁㈠崟缂栧彿: - - - - - - - 鑱旂郴鏂瑰紡: - - - - - - - 闇姹傚崟浣: - - - - - - - false - - - - 0 - 30 - - - - 寰尝浠跨湡璁㈠崟 - - - - - - - false - - - - 0 - 1 - - - - - 16777215 - 1 - - - - - - - - false - - - - 0 - 30 - - - - - + false @@ -275,50 +67,26 @@ - - - - 闇姹傜敤鎴稩D: - - - - - + + false 0 - 30 + 1 - - OWLS_PC_DF_20240802150813_4570 - - - - - - + - 0 - 30 + 16777215 + 1 - - 搴旂敤鎶鏈泦鎴愪笌鍏变韩鏈嶅姟鍒嗙郴缁 - - - - 璁㈠崟绫诲瀷: - - - - false @@ -340,8 +108,35 @@ - - + + + + 璁㈠崟缂栧彿: + + + + + + + 璁㈠崟鍒涘缓鏃堕棿: + + + + + + + + 0 + 30 + + + + 鑻忕爺闄 + + + + + false @@ -351,58 +146,9 @@ 30 - - 348 - - - - - 璁㈠崟鐘舵: - - - - - - - - 0 - 30 - - - - zyg990305zyg@163.com - - - - - - - 浠跨湡鐩殑: - - - - - - - false - - - - 0 - 1 - - - - - 16777215 - 1 - - - - - + false @@ -421,13 +167,308 @@ - + + + + + 0 + 30 + + + + + + + + 鏇存柊鐘舵 + + + + 闇姹傜敤鎴稩D: + + + + + + + + 0 + 30 + + + + zyg990305zyg@163.com + + + + + + + 鑱旂郴鏂瑰紡: + + + + + + + 璁㈠崟妯″紡: + + + + + + + 璁㈠崟鏉ユ簮: + + + + + + + 璁㈠崟id: + + + + + + + 浠跨湡闇姹: + + + + + + + 鐢宠浜: + + + + + + + false + + + + 0 + 1 + + + + + 16777215 + 1 + + + + + + + + false + + + + 0 + 30 + + + + 348 + + + + + + + + 0 + 300 + + + + + + + + + 0 + 30 + + + + 搴旂敤鎶鏈泦鎴愪笌鍏变韩鏈嶅姟鍒嗙郴缁 + + + + + + + false + + + + 0 + 50 + + + + + + + + false + + + + 0 + 30 + + + + ZZX-gxfw001030 + + + + + + + false + + + + 0 + 30 + + + + OWLS_PC_DF_20240802150813_4570 + + + + + + + 浠跨湡鐩殑: + + + + + + + false + + + + 0 + 1 + + + + + 16777215 + 1 + + + + 璁㈠崟璇︽儏: + + + + + + + false + + + + 0 + 30 + + + + 寰尝浠跨湡璁㈠崟 + + + + + + + 闇姹傚崟浣: + + + + + + + 璁㈠崟绫诲瀷: + + + + + + + 璁㈠崟鐘舵: + + + + + + + false + + + + 0 + 30 + + + + 鍘熷洜 + + + + + + + + 0 + 30 + + + + + 绛夊緟澶勭悊 + + + + + 宸叉帴鏀 + + + + + 宸叉嫆缁 + + + + + 姝e湪澶勭悊涓 + + + + + 宸插畬鎴 + + + + diff --git a/LAMPTaskManagerMainWindows.cpp b/LAMPTaskManagerMainWindows.cpp index f545777..afc1e25 100644 --- a/LAMPTaskManagerMainWindows.cpp +++ b/LAMPTaskManagerMainWindows.cpp @@ -76,6 +76,9 @@ namespace WBFZTASK { else if (colname.contains(u8"创建时间")) { ui->tableWidget->setItem(rowidx, colidx, new QTableWidgetItem(QString("%1").arg(taskcollect->getCurrentTaskAt(rowidx)->getCreateTime()))); } + else if (colname.contains(u8"任务内容")) { + ui->tableWidget->setItem(rowidx, colidx, new QTableWidgetItem(QString("%1").arg(taskcollect->getCurrentTaskAt(rowidx)->getContactInfo()))); + } else { } diff --git a/LAMPWBDDManager.cpp b/LAMPWBDDManager.cpp index 03621d0..4eb9e5b 100644 --- a/LAMPWBDDManager.cpp +++ b/LAMPWBDDManager.cpp @@ -8,6 +8,8 @@ #include #include #include +#include + #include "TaskOrder.h" namespace LAMPWBCONNECT { @@ -95,10 +97,12 @@ namespace LAMPWBCONNECT { //WBFZTASK::TaskCollect::getInstance()->LoadTaskCollect(doc, reply->errorString()); qDebug() << "request success " << reply->url(); + QMessageBox::information(nullptr, u8"信息", u8"信息更新成功"); } else { //WBFZTASK::TaskCollect::getInstance()->LoadTaskCollectState(reply->errorString()); qDebug() << "request failed:" << reply->errorString(); + QMessageBox::information(nullptr, u8"信息", u8"信息更新失败"); } reply->deleteLater(); }); diff --git a/TaskOrder.cpp b/TaskOrder.cpp index 8955b3e..5e2a7ff 100644 --- a/TaskOrder.cpp +++ b/TaskOrder.cpp @@ -156,6 +156,12 @@ namespace WBFZTASK { if (jsonObj.contains("ordertype") && !(jsonObj["ordertype"].isNull()) && (jsonObj["ordertype"].toString().contains(QString(u8"微波仿真订单")))) { TaskOrder neworder(jsonObj); + if (neworder.getIntention().trimmed().contains(u8"测试") && neworder.getIntention().trimmed().count() == 2) { + continue; + } + else if (neworder.getOrderStatus().trimmed().count() == 0) { + neworder.setOrderStatus(u8"已完成"); + } this->Currnettasklist.append(neworder); } else {