同步代码
parent
194741cbfe
commit
d16f28c699
|
@ -0,0 +1,70 @@
|
|||
#include "DialogSubmitTaskResult.h"
|
||||
#include "ui_DialogSubmitTaskResult.h"
|
||||
#include <QFileDialog>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QMessageBox>
|
||||
#include "TaskOrder.h"
|
||||
namespace WBFZTASK {
|
||||
DialogSubmitTaskResult::DialogSubmitTaskResult(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
,ui(new Ui::DialogSubmitTaskResultClass)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QObject::connect(ui->pushButton_Select, SIGNAL(clicked()), this, SLOT(on_clicked_pushButton_Select()));
|
||||
}
|
||||
|
||||
DialogSubmitTaskResult::~DialogSubmitTaskResult()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
void DialogSubmitTaskResult::SetTaskOrder(WBFZTASK::TaskOrder* task)
|
||||
{
|
||||
this->task = task;
|
||||
this->ui->lineEdit_applicant->setText(task->getApplicant());
|
||||
|
||||
this->ui->lineEdit_contactinfo->setText(task->getContactInfo());
|
||||
this->ui->lineEdit_createtime->setText(task->getCreateTime());
|
||||
this->ui->lineEdit_ordercode->setText(task->getOrderCode());
|
||||
this->ui->lineEdit_orderid->setText(QString::number(task->getOrderId()));
|
||||
|
||||
}
|
||||
void DialogSubmitTaskResult::accept()
|
||||
{
|
||||
QMessageBox::information(this, u8"信息", u8"成果文件提交成功");
|
||||
}
|
||||
|
||||
|
||||
void DialogSubmitTaskResult::on_clicked_pushButton_Select() {
|
||||
// 创建文件对话框
|
||||
QFileDialog fileDialog;
|
||||
fileDialog.setFileMode(QFileDialog::ExistingFiles);
|
||||
fileDialog.setNameFilter(tr("ZIP files (*.zip)"));
|
||||
fileDialog.setViewMode(QFileDialog::List);
|
||||
|
||||
// 显示文件对话框并获取选中的文件路径
|
||||
QString fileNames=fileDialog.getOpenFileName();
|
||||
|
||||
// 处理选择的文件
|
||||
if (!fileNames.isEmpty())
|
||||
{
|
||||
QString fileName = fileNames; // 这里假设用户选择了一个文件
|
||||
ui->lineEdit_ResultFilePath->setText(fileName);
|
||||
// 这里可以进一步处理选中的 ZIP 文件,例如读取或解压
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "No file selected.";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
QPushButton *pushButton_Select;
|
||||
QPushButton *okButton;
|
||||
QPushButton *cancelButton;
|
||||
|
||||
*/
|
|
@ -0,0 +1,30 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include "TaskOrder.h"
|
||||
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class DialogSubmitTaskResultClass;
|
||||
}
|
||||
|
||||
|
||||
namespace WBFZTASK {
|
||||
class DialogSubmitTaskResult : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DialogSubmitTaskResult(QWidget* parent = nullptr);
|
||||
~DialogSubmitTaskResult();
|
||||
void SetTaskOrder(WBFZTASK::TaskOrder* task);
|
||||
public slots:
|
||||
void on_clicked_pushButton_Select();
|
||||
void accept();
|
||||
|
||||
private:
|
||||
Ui::DialogSubmitTaskResultClass* ui;
|
||||
WBFZTASK::TaskOrder* task;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogSubmitTaskResultClass</class>
|
||||
<widget class="QDialog" name="DialogSubmitTaskResultClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>656</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>成果提交页面</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>576</width>
|
||||
<height>292</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_ordercode">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OWLS_PC_DF_20240802150813_4570</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_applicant">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>zyg990305zyg@163.com</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_ResultFilePath">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_orderid">
|
||||
<property name="text">
|
||||
<string>订单id:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_contactinfo">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_orderid">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>348</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_applicant">
|
||||
<property name="text">
|
||||
<string>申请人:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_createtime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2024-08-02 15:08:13</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_ordercode">
|
||||
<property name="text">
|
||||
<string>订单编号:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_createtime">
|
||||
<property name="text">
|
||||
<string>订单创建时间:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>成果文件:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_contactinfo">
|
||||
<property name="text">
|
||||
<string>联系方式:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QPushButton" name="pushButton_Select">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>选择</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DialogSubmitTaskResultClass</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>461</x>
|
||||
<y>627</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>299</x>
|
||||
<y>327</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DialogSubmitTaskResultClass</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>547</x>
|
||||
<y>627</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>299</x>
|
||||
<y>327</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -0,0 +1,40 @@
|
|||
#include "DialogTaskOrder.h"
|
||||
#include "ui_DialogTaskOrder.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
namespace WBFZTASK {
|
||||
DialogTaskOrder::DialogTaskOrder(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::DialogTaskOrder)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
DialogTaskOrder::~DialogTaskOrder()
|
||||
{}
|
||||
|
||||
void DialogTaskOrder::SetTaskOrder(WBFZTASK::TaskOrder* task)
|
||||
{
|
||||
this->task = task;
|
||||
this->ui->lineEdit_applicant->setText(task->getApplicant());
|
||||
this->ui->lineEdit_company->setText(task->getCompany());
|
||||
this->ui->lineEdit_contactinfo->setText(task->getContactInfo());
|
||||
this->ui->lineEdit_createtime->setText(task->getCreateTime());
|
||||
this->ui->lineEdit_ordercode->setText(task->getOrderCode());
|
||||
this->ui->lineEdit_orderid->setText(QString::number(task->getOrderId()));
|
||||
this->ui->lineEdit_ordermode->setText(task->getOrderMode());
|
||||
this->ui->lineEdit_ordersource->setText(task->getOrderSource());
|
||||
this->ui->lineEdit_ordertype->setText(task->getOrderType());
|
||||
this->ui->lineEdit_updatetime->setText(task->getUpdateTime());
|
||||
this->ui->lineEdit_userid->setText(task->getUserId());
|
||||
this->ui->plainTextEdit_demand->setPlainText(task->getDemand());
|
||||
this->ui->plainTextEdit_intention->setPlainText(task->getIntention());
|
||||
this->ui->plainTextEdit_orderdetails->setPlainText(task->getOrderDetails());
|
||||
this->ui->plainTextEdit_orderstoreprocess->setPlainText(task->getOrderStoreProcess());
|
||||
}
|
||||
|
||||
|
||||
void DialogTaskOrder::accept() {
|
||||
QMessageBox::information(this, u8"ÐÅÏ¢", u8"ÐÅÏ¢¸üгɹ¦");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include "TaskOrder.h"
|
||||
|
||||
namespace Ui {
|
||||
class DialogTaskOrder;
|
||||
}
|
||||
|
||||
namespace WBFZTASK {
|
||||
class DialogTaskOrder : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DialogTaskOrder(QWidget* parent = nullptr);
|
||||
~DialogTaskOrder();
|
||||
void SetTaskOrder(WBFZTASK::TaskOrder* task);
|
||||
public slots:
|
||||
void accept();
|
||||
|
||||
private:
|
||||
Ui::DialogTaskOrder* ui;
|
||||
WBFZTASK::TaskOrder* task;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,428 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogTaskOrder</class>
|
||||
<widget class="QDialog" name="DialogTaskOrder">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>893</width>
|
||||
<height>740</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>任务详细界面</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>852</width>
|
||||
<height>1007</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_orderid">
|
||||
<property name="text">
|
||||
<string>订单id:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_orderid">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>348</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_ordercode">
|
||||
<property name="text">
|
||||
<string>订单编号:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_ordercode">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OWLS_PC_DF_20240802150813_4570</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_createtime">
|
||||
<property name="text">
|
||||
<string>订单创建时间:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_createtime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2024-08-02 15:08:13</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_ordermode">
|
||||
<property name="text">
|
||||
<string>订单模式:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_ordermode">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_orderstatus">
|
||||
<property name="text">
|
||||
<string>订单状态:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="comboBox_orderstatus">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="label_userid">
|
||||
<property name="text">
|
||||
<string>需求用户ID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_userid">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ZZX-gxfw001030</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_ordersource">
|
||||
<property name="text">
|
||||
<string>订单来源:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_ordersource">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>应用技术集成与共享服务分系统</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_applicant">
|
||||
<property name="text">
|
||||
<string>申请人:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_applicant">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>zyg990305zyg@163.com</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_contactinfo">
|
||||
<property name="text">
|
||||
<string>联系方式:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_contactinfo">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_company">
|
||||
<property name="text">
|
||||
<string>需求单位:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_company">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>苏研院</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="label_intention">
|
||||
<property name="text">
|
||||
<string>仿真目的:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit_intention">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="label_demand">
|
||||
<property name="text">
|
||||
<string>仿真需求:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit_demand">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>300</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="label_orderdetails">
|
||||
<property name="text">
|
||||
<string>订单详情:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit_orderdetails"/>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label_orderstoreprocess">
|
||||
<property name="text">
|
||||
<string>订单处理进度:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="1">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit_orderstoreprocess"/>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<widget class="QLabel" name="label_updatetime">
|
||||
<property name="text">
|
||||
<string>订单更新时间:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QLabel" name="label_ordertype">
|
||||
<property name="text">
|
||||
<string>订单类型:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_ordertype">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>微波仿真订单</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_updatetime">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okButton">
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DialogTaskOrder</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>278</x>
|
||||
<y>253</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>96</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>cancelButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>DialogTaskOrder</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>369</x>
|
||||
<y>253</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>179</x>
|
||||
<y>282</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -0,0 +1,183 @@
|
|||
#include "LAMPTaskManagerMainWindows.h"
|
||||
#include "LAMPWBDDManager.h"
|
||||
#include "ui_LAMPTaskManagerMainWindows.h"
|
||||
#include "DialogTaskOrder.h"
|
||||
#include "DialogSubmitTaskResult.h"
|
||||
namespace WBFZTASK {
|
||||
LAMPTaskManagerMainWindows::LAMPTaskManagerMainWindows(QWidget* parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::LAMPTaskManagerMainWindowsClass)
|
||||
{
|
||||
connectmanager = new LAMPWBCONNECT::LAMPWBDDManager;
|
||||
|
||||
ui->setupUi(this);
|
||||
QObject::connect(TaskCollect::getInstance(), SIGNAL(updateSIG(WBTASKSAPIREQURSTSTATE, QString)), this, SLOT(updateTaskListCollect(WBTASKSAPIREQURSTSTATE , QString )));
|
||||
QObject::connect(ui->pushButton_Search ,SIGNAL(clicked()),this,SLOT(on_clicked_pushButton_Search ()));
|
||||
QObject::connect(ui->pushButton_ShowTask,SIGNAL(clicked()),this,SLOT(on_clicked_pushButton_ShowTask()));
|
||||
QObject::connect(ui->pushButton_LastPage,SIGNAL(clicked()),this,SLOT(on_clicked_pushButton_LastPage()));
|
||||
QObject::connect(ui->pushButton_NextPage,SIGNAL(clicked()),this,SLOT(on_clicked_pushButton_NextPage()));
|
||||
QObject::connect(ui->pushButton_submitResult, SIGNAL(clicked()), this, SLOT(on_clicked_pushButton_submitResult()));
|
||||
|
||||
|
||||
ui->spinBox_PageIdx->setMinimum(1);
|
||||
ui->spinBox_PageIdx->setValue(1);
|
||||
ui->spinBox_PageIdx->setMaximum(10000);
|
||||
ui->pushButton_LastPage->setEnabled(false);
|
||||
ui->pushButton_NextPage->setEnabled(false);
|
||||
}
|
||||
|
||||
LAMPTaskManagerMainWindows::~LAMPTaskManagerMainWindows()
|
||||
{}
|
||||
|
||||
void LAMPTaskManagerMainWindows::ClearTable()
|
||||
{
|
||||
// ui->table
|
||||
ui->tableWidget->clear();
|
||||
|
||||
}
|
||||
|
||||
void LAMPTaskManagerMainWindows::ShowTable()
|
||||
{
|
||||
|
||||
this->ClearTable();
|
||||
TaskCollect* taskcollect = TaskCollect::getInstance();
|
||||
|
||||
QStringList headers = {
|
||||
u8"订单ID",u8"订单模式",u8"订单状态",u8"订单目的",u8"申请人",u8"创建时间"
|
||||
};
|
||||
|
||||
ui->tableWidget->setColumnCount(headers.size());
|
||||
ui->tableWidget->setHorizontalHeaderLabels(headers);
|
||||
ui->tableWidget->setRowCount(taskcollect->getPagecount());
|
||||
qDebug() << "page Count : " << taskcollect->getPagecount();
|
||||
|
||||
|
||||
QString colname = "";
|
||||
|
||||
|
||||
|
||||
for (int rowidx = 0; rowidx < taskcollect->getPagecount();rowidx++) {
|
||||
// 按照列添加
|
||||
|
||||
for (int colidx = 0; colidx < headers.count(); colidx++) {
|
||||
colname= ui->tableWidget->model()->headerData(colidx, Qt::Horizontal).toString();
|
||||
if(colname.contains(u8"订单ID")){
|
||||
ui->tableWidget->setItem(rowidx, colidx, new QTableWidgetItem(QString("%1").arg(taskcollect->getCurrentTaskAt(rowidx)->getOrderId())));
|
||||
}
|
||||
else if(colname.contains(u8"订单模式")){
|
||||
ui->tableWidget->setItem(rowidx, colidx, new QTableWidgetItem(QString("%1").arg(taskcollect->getCurrentTaskAt(rowidx)->getOrderMode())));
|
||||
}
|
||||
else if(colname.contains(u8"订单状态")){
|
||||
ui->tableWidget->setItem(rowidx, colidx, new QTableWidgetItem(QString("%1").arg(taskcollect->getCurrentTaskAt(rowidx)->getOrderStatus())));
|
||||
}
|
||||
else if(colname.contains(u8"订单目的")){
|
||||
ui->tableWidget->setItem(rowidx, colidx, new QTableWidgetItem(QString("%1").arg(taskcollect->getCurrentTaskAt(rowidx)->getIntention())));
|
||||
}
|
||||
else if(colname.contains(u8"申请人")){
|
||||
ui->tableWidget->setItem(rowidx, colidx, new QTableWidgetItem(QString("%1").arg(taskcollect->getCurrentTaskAt(rowidx)->getApplicant())));
|
||||
}
|
||||
else if (colname.contains(u8"创建时间")) {
|
||||
ui->tableWidget->setItem(rowidx, colidx, new QTableWidgetItem(QString("%1").arg(taskcollect->getCurrentTaskAt(rowidx)->getCreateTime())));
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 处理显示信息
|
||||
int alltaskcount = taskcollect->getTotal();
|
||||
int pageCount = taskcollect->getPagecount();
|
||||
int Pagetotal = alltaskcount / pageCount +( alltaskcount % pageCount == 0 ? 0 : 1);
|
||||
ui->spinBox_PageIdx->setMaximum(Pagetotal);
|
||||
ui->statusBar->showMessage(QString(u8"第 %1 页 / 共 %2 页").arg(taskcollect->getPagenum()).arg(Pagetotal));
|
||||
ui->spinBox_PageIdx->setValue(taskcollect->getPagenum());
|
||||
if (taskcollect->getPagenum() == 1) {
|
||||
ui->pushButton_LastPage->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
ui->pushButton_LastPage->setEnabled(true);
|
||||
}
|
||||
|
||||
if (taskcollect->getPagenum() == Pagetotal) {
|
||||
ui->pushButton_NextPage->setEnabled(false);
|
||||
}
|
||||
else {
|
||||
ui->pushButton_NextPage->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
void LAMPTaskManagerMainWindows::on_clicked_pushButton_Search()
|
||||
{
|
||||
int searchPage = ui->spinBox_PageIdx->value();
|
||||
int searchPageNum = ui->spinBox_tasknum->value();
|
||||
ui->statusBar->showMessage(QString(u8"正在查询 第 %1 页 中, 每页任务数:%2 ....").arg(searchPage).arg(searchPageNum));
|
||||
connectmanager->getTaskList(searchPageNum, searchPage);
|
||||
}
|
||||
|
||||
void LAMPTaskManagerMainWindows::on_clicked_pushButton_ShowTask()
|
||||
{
|
||||
if (ui->tableWidget->selectedItems().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
int currentRow = ui->tableWidget->currentRow();
|
||||
|
||||
|
||||
WBFZTASK::DialogTaskOrder* dialogtaskshow = new WBFZTASK::DialogTaskOrder(this);
|
||||
dialogtaskshow->SetTaskOrder(TaskCollect::getInstance()->getCurrentTaskAt(currentRow));
|
||||
dialogtaskshow->exec();
|
||||
}
|
||||
|
||||
void LAMPTaskManagerMainWindows::on_clicked_pushButton_LastPage()
|
||||
{
|
||||
int searchPage = TaskCollect::getInstance()->getPagenum()-1;
|
||||
int searchPageNum = ui->spinBox_tasknum->value();
|
||||
ui->statusBar->showMessage(QString(u8"正在查询 第 %1 页 中, 每页任务数:%2 ....").arg(searchPage).arg(searchPageNum));
|
||||
connectmanager->getTaskList(searchPageNum, searchPage);
|
||||
}
|
||||
|
||||
void LAMPTaskManagerMainWindows::on_clicked_pushButton_NextPage()
|
||||
{
|
||||
int searchPage = TaskCollect::getInstance()->getPagenum()+1;
|
||||
int searchPageNum = ui->spinBox_tasknum->value();
|
||||
ui->statusBar->showMessage(QString(u8"正在查询 第 %1 页 中, 每页任务数:%2 ....").arg(searchPage).arg(searchPageNum));
|
||||
connectmanager->getTaskList(searchPageNum, searchPage);
|
||||
}
|
||||
|
||||
void LAMPTaskManagerMainWindows::on_clicked_pushButton_submitResult()
|
||||
{
|
||||
if (ui->tableWidget->selectedItems().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
int currentRow = ui->tableWidget->currentRow();
|
||||
|
||||
DialogSubmitTaskResult* dialog = new DialogSubmitTaskResult;
|
||||
dialog->SetTaskOrder(TaskCollect::getInstance()->getCurrentTaskAt(currentRow));
|
||||
dialog->exec();
|
||||
}
|
||||
|
||||
|
||||
void LAMPTaskManagerMainWindows::updateTaskListCollect(WBTASKSAPIREQURSTSTATE state, QString message) {
|
||||
// 触发更新
|
||||
|
||||
switch (state) {
|
||||
case WBTASKSAPIREQURSTSTATE::ERROR: {
|
||||
ui->statusBar->showMessage(QString(u8"查询错误: ").arg(message));
|
||||
break;
|
||||
}
|
||||
case WBTASKSAPIREQURSTSTATE::FAIL: {
|
||||
ui->statusBar->showMessage(QString(u8"查询失败: ").arg(message));
|
||||
break;
|
||||
}
|
||||
case WBTASKSAPIREQURSTSTATE::SUCCESS: {
|
||||
|
||||
this->ShowTable();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ui->statusBar->showMessage(QString(u8"请重试,信息:").arg(message));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
#pragma once
|
||||
|
||||
#include <QMainWindow>
|
||||
#include "TaskOrder.h"
|
||||
#include "LAMPWBDDManager.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class LAMPTaskManagerMainWindowsClass;
|
||||
}
|
||||
|
||||
|
||||
namespace WBFZTASK {
|
||||
class LAMPTaskManagerMainWindows : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
LAMPTaskManagerMainWindows(QWidget* parent = nullptr);
|
||||
~LAMPTaskManagerMainWindows();
|
||||
|
||||
public :
|
||||
void ClearTable();
|
||||
void ShowTable();
|
||||
|
||||
|
||||
public slots:
|
||||
void updateTaskListCollect(WBTASKSAPIREQURSTSTATE state, QString message);
|
||||
void on_clicked_pushButton_Search();
|
||||
void on_clicked_pushButton_ShowTask();
|
||||
void on_clicked_pushButton_LastPage();
|
||||
void on_clicked_pushButton_NextPage();
|
||||
void on_clicked_pushButton_submitResult();
|
||||
|
||||
private:
|
||||
QString LoginName;
|
||||
LAMPWBCONNECT::LAMPWBDDManager* connectmanager;
|
||||
|
||||
private:
|
||||
Ui::LAMPTaskManagerMainWindowsClass* ui;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,171 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>LAMPTaskManagerMainWindowsClass</class>
|
||||
<widget class="QMainWindow" name="LAMPTaskManagerMainWindowsClass">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1218</width>
|
||||
<height>579</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>LAMPTaskManagerMainWindows</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_Search">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>查询</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_ShowTask">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>查看订单</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_submitResult">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>提交订单成果</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_LastPage">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>上一页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_NextPage">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>下一页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>每次查询条数</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_tasknum">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>跳转第 </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox_PageIdx">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>27</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>页</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.9.34701.34
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LAMPWBDD", "LAMPWBDD.vcxproj", "{F8B4568B-E065-48AF-916E-0A59A05C86CC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F8B4568B-E065-48AF-916E-0A59A05C86CC}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F8B4568B-E065-48AF-916E-0A59A05C86CC}.Debug|x64.Build.0 = Debug|x64
|
||||
{F8B4568B-E065-48AF-916E-0A59A05C86CC}.Release|x64.ActiveCfg = Release|x64
|
||||
{F8B4568B-E065-48AF-916E-0A59A05C86CC}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {EF8E3423-CCAE-4D6C-B527-D130079BD542}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,127 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{F8B4568B-E065-48AF-916E-0A59A05C86CC}</ProjectGuid>
|
||||
<Keyword>QtVS_v304</Keyword>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">10.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">10.0</WindowsTargetPlatformVersion>
|
||||
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
|
||||
<Import Project="$(QtMsBuild)\qt_defaults.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="QtSettings">
|
||||
<QtInstall>qt5_applications_Qt</QtInstall>
|
||||
<QtModules>core;gui;widgets</QtModules>
|
||||
<QtBuildConfig>debug</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
|
||||
<QtInstall>qt5_applications_Qt</QtInstall>
|
||||
<QtModules>core;opengl;network;gui;help;widgets;location;webchannel;websockets;webengine;datavisualization;networkauth;remoteobjects</QtModules>
|
||||
<QtBuildConfig>release</QtBuildConfig>
|
||||
</PropertyGroup>
|
||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
|
||||
</Target>
|
||||
<ImportGroup Label="ExtensionSettings" />
|
||||
<ImportGroup Label="Shared" />
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(QtMsBuild)\Qt.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<Optimization>Disabled</Optimization>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="Configuration">
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="DialogSubmitTaskResult.cpp" />
|
||||
<ClCompile Include="DialogTaskOrder.cpp" />
|
||||
<ClCompile Include="LAMPTaskManagerMainWindows.cpp" />
|
||||
<ClCompile Include="LAMPWBDDManager.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="TaskOrder.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="DialogTaskOrder.h" />
|
||||
<QtMoc Include="LAMPTaskManagerMainWindows.h" />
|
||||
<QtMoc Include="DialogSubmitTaskResult.h" />
|
||||
<ClInclude Include="LAMPWBDDManager.h" />
|
||||
<QtMoc Include="TaskOrder.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="DialogSubmitTaskResult.ui" />
|
||||
<QtUic Include="DialogTaskOrder.ui" />
|
||||
<QtUic Include="LAMPTaskManagerMainWindows.ui" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||
<Import Project="$(QtMsBuild)\qt.targets" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>qml;cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Form Files">
|
||||
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
|
||||
<Extensions>ui</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Translation Files">
|
||||
<UniqueIdentifier>{639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}</UniqueIdentifier>
|
||||
<Extensions>ts</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="main.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LAMPWBDDManager.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="TaskOrder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DialogTaskOrder.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LAMPTaskManagerMainWindows.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="DialogSubmitTaskResult.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="LAMPWBDDManager.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="TaskOrder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="DialogTaskOrder.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="LAMPTaskManagerMainWindows.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="DialogSubmitTaskResult.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUic Include="DialogTaskOrder.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="LAMPTaskManagerMainWindows.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="DialogSubmitTaskResult.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,70 @@
|
|||
#include "LAMPWBDDManager.h"
|
||||
#include <QJsonArray>
|
||||
#include <QString>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkRequest>
|
||||
#include <qjsonobject.h>
|
||||
#include <QJsonDocument>
|
||||
#include <qobject.h>
|
||||
#include <QUrl>
|
||||
#include <QUrlQuery>
|
||||
#include "TaskOrder.h"
|
||||
|
||||
namespace LAMPWBCONNECT {
|
||||
LAMPWBDDManager::LAMPWBDDManager()
|
||||
{
|
||||
}
|
||||
LAMPWBDDManager::~LAMPWBDDManager()
|
||||
{
|
||||
}
|
||||
void LAMPWBDDManager::loginIn()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
void LAMPWBDDManager::getTaskList(int count, int pagenum)
|
||||
{
|
||||
|
||||
|
||||
QNetworkAccessManager* manager = new QNetworkAccessManager();
|
||||
QUrl url = QUrl(QString( "https://124.16.188.131:9699/gateway/api/interface/ddtc/dealManage/wbfzddSearch?"));
|
||||
qDebug() << QString("count : %1 , pagenum: %2 , orderType: %3").arg(count).arg(pagenum).arg(QString(u8"菓꺼력廬땐데"));
|
||||
QUrlQuery query;
|
||||
query.addQueryItem("count", QString::number(count));
|
||||
query.addQueryItem("pagenum", QString::number(pagenum));
|
||||
query.addQueryItem("orderType", QString(u8"菓꺼력廬땐데"));
|
||||
url.setQuery(query);
|
||||
|
||||
QNetworkRequest request;
|
||||
request.setUrl(url);
|
||||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||
//request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
|
||||
QSslConfiguration config = QSslConfiguration::defaultConfiguration();
|
||||
config.setProtocol(QSsl::AnyProtocol);;
|
||||
config.setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||
request.setSslConfiguration(config);
|
||||
|
||||
|
||||
QByteArray postData;// = query.toString().toUtf8();
|
||||
QNetworkReply* reply = manager->post(request, postData);
|
||||
|
||||
QObject::connect(reply, &QNetworkReply::finished, [reply, manager]() {
|
||||
if (reply->error() == QNetworkReply::NoError) {
|
||||
QByteArray response_data = reply->readAll();
|
||||
QJsonDocument doc = QJsonDocument::fromJson(response_data);
|
||||
//qDebug() << response_data;
|
||||
qDebug() << doc["total"] ;
|
||||
qDebug() << doc["pagenum"] ;
|
||||
|
||||
WBFZTASK::TaskCollect::getInstance()->LoadTaskCollect(doc, reply->errorString());
|
||||
qDebug() << "request success " << reply->url();
|
||||
}
|
||||
else {
|
||||
WBFZTASK::TaskCollect::getInstance()->LoadTaskCollectState(reply->errorString());
|
||||
qDebug() << "request failed:" << reply->errorString();
|
||||
}
|
||||
reply->deleteLater();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
// 微波订单管理界面
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkRequest>
|
||||
#include <QNetworkReply>
|
||||
#include <QUrl>
|
||||
|
||||
namespace LAMPWBCONNECT {
|
||||
class LAMPWBDDManager
|
||||
{
|
||||
public:
|
||||
LAMPWBDDManager();
|
||||
~LAMPWBDDManager();
|
||||
public:
|
||||
void loginIn();
|
||||
void getTaskList(int count, int pagenum);
|
||||
|
||||
|
||||
public :
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,238 @@
|
|||
#include "TaskOrder.h"
|
||||
#include <qstring.h>
|
||||
#include <QJsonDocument>
|
||||
#include <qjsonobject.h>
|
||||
#include <qdebug.h>
|
||||
#include <qjsonarray.h>
|
||||
namespace WBFZTASK {
|
||||
|
||||
TaskCollect* TaskCollect::instance = nullptr;
|
||||
|
||||
|
||||
TaskOrder::TaskOrder(){}
|
||||
|
||||
TaskOrder::TaskOrder(const QJsonObject& jsonObj) {
|
||||
// 使用QJsonObject初始化所有成员变量
|
||||
createTime = jsonObj["createtime"].toString();
|
||||
orderStatus = jsonObj["orderstatus"].toString();
|
||||
orderId = jsonObj["orderid"].toInt();
|
||||
orderMode = jsonObj["ordermode"].toString();
|
||||
ip = jsonObj["ip"].toString();
|
||||
orderDownloadAddr = jsonObj["orderdownloadaddr"].toString();
|
||||
userId = jsonObj["userid"].toString();
|
||||
demand = jsonObj["demand"].toString();
|
||||
orderSource = jsonObj["ordersource"].toString();
|
||||
applicant = jsonObj["applicant"].toString();
|
||||
intention = jsonObj["intention"].toString();
|
||||
orderStoreProcess = jsonObj["orderstoreprocess"].toString();
|
||||
orderCode = jsonObj["ordercode"].toString();
|
||||
qrstCode = jsonObj["qrstcode"].toString();
|
||||
contactInfo = jsonObj["contactinfo"].toString();
|
||||
orderDetails = jsonObj["orderdetails"].toString();
|
||||
company = jsonObj["company"].toString();
|
||||
dataSize = jsonObj["datasize"].toString();
|
||||
updateTime = jsonObj["updatetime"].toString();
|
||||
orderType = jsonObj["ordertype"].toString();
|
||||
|
||||
//// 打印
|
||||
|
||||
//for (auto key : jsonObj.keys()) {
|
||||
// QJsonValue value = jsonObj.value(key);
|
||||
|
||||
// // 检查值是否为 null
|
||||
// if (value.isNull()) {
|
||||
// qDebug() << key << ": null";
|
||||
// }
|
||||
// else {
|
||||
// qDebug() << key << ":" << value.toVariant().toString();
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//qDebug() << "createTime " << createTime;
|
||||
//qDebug() << "orderStatus " << orderStatus;
|
||||
//qDebug() << "orderId " << orderId;
|
||||
//qDebug() << "orderMode " << orderMode;
|
||||
//qDebug() << "ip " << ip;
|
||||
//qDebug() << "orderDownloadAddr " << orderDownloadAddr;
|
||||
//qDebug() << "userId " << userId;
|
||||
//qDebug() << "demand " << demand;
|
||||
//qDebug() << "orderSource " << orderSource;
|
||||
//qDebug() << "applicant " << applicant;
|
||||
//qDebug() << "intention " << intention;
|
||||
//qDebug() << "orderStoreProcess " << orderStoreProcess;
|
||||
//qDebug() << "orderCode " << orderCode;
|
||||
//qDebug() << "qrstCode " << qrstCode;
|
||||
//qDebug() << "contactInfo " << contactInfo;
|
||||
//qDebug() << "orderDetails " << orderDetails;
|
||||
//qDebug() << "company " << company;
|
||||
//qDebug() << "dataSize " << dataSize;
|
||||
//qDebug() << "updateTime " << updateTime;
|
||||
//qDebug() << "orderType " << orderType;
|
||||
|
||||
}
|
||||
|
||||
void TaskOrder::setCreateTime(const QString& value) { createTime = value; }
|
||||
QString TaskOrder::getCreateTime() const { return createTime; }
|
||||
|
||||
void TaskOrder::setOrderStatus(const QString& value) { orderStatus = value; }
|
||||
QString TaskOrder::getOrderStatus() const { return orderStatus; }
|
||||
|
||||
void TaskOrder::setOrderId(int value) { orderId = value; }
|
||||
int TaskOrder::getOrderId() const { return orderId; }
|
||||
|
||||
void TaskOrder::setOrderMode(const QString& value) { orderMode = value; }
|
||||
QString TaskOrder::getOrderMode() const { return orderMode; }
|
||||
|
||||
void TaskOrder::setIp(const QString& value) { ip = value; }
|
||||
QString TaskOrder::getIp() const { return ip; }
|
||||
|
||||
void TaskOrder::setOrderDownloadAddr(const QString& value) { orderDownloadAddr = value; }
|
||||
QString TaskOrder::getOrderDownloadAddr() const { return orderDownloadAddr; }
|
||||
|
||||
void TaskOrder::setUserId(const QString& value) { userId = value; }
|
||||
QString TaskOrder::getUserId() const { return userId; }
|
||||
|
||||
void TaskOrder::setDemand(const QString& value) { demand = value; }
|
||||
QString TaskOrder::getDemand() const { return demand; }
|
||||
|
||||
void TaskOrder::setOrderSource(const QString& value) { orderSource = value; }
|
||||
QString TaskOrder::getOrderSource() const { return orderSource; }
|
||||
|
||||
void TaskOrder::setApplicant(const QString& value) { applicant = value; }
|
||||
QString TaskOrder::getApplicant() const { return applicant; }
|
||||
|
||||
void TaskOrder::setIntention(const QString& value) { intention = value; }
|
||||
QString TaskOrder::getIntention() const { return intention; }
|
||||
|
||||
void TaskOrder::setOrderStoreProcess(const QString& value) { orderStoreProcess = value; }
|
||||
QString TaskOrder::getOrderStoreProcess() const { return orderStoreProcess; }
|
||||
|
||||
void TaskOrder::setOrderCode(const QString& value) { orderCode = value; }
|
||||
QString TaskOrder::getOrderCode() const { return orderCode; }
|
||||
|
||||
void TaskOrder::setQrstCode(const QString& value) { qrstCode = value; }
|
||||
QString TaskOrder::getQrstCode() const { return qrstCode; }
|
||||
|
||||
void TaskOrder::setContactInfo(const QString& value) { contactInfo = value; }
|
||||
QString TaskOrder::getContactInfo() const { return contactInfo; }
|
||||
|
||||
void TaskOrder::setOrderDetails(const QString& value) { orderDetails = value; }
|
||||
QString TaskOrder::getOrderDetails() const { return orderDetails; }
|
||||
|
||||
void TaskOrder::setCompany(const QString& value) { company = value; }
|
||||
QString TaskOrder::getCompany() const { return company; }
|
||||
|
||||
void TaskOrder::setDataSize(const QString& value) { dataSize = value; }
|
||||
QString TaskOrder::getDataSize() const { return dataSize; }
|
||||
|
||||
void TaskOrder::setUpdateTime(const QString& value) { updateTime = value; }
|
||||
QString TaskOrder::getUpdateTime() const { return updateTime; }
|
||||
|
||||
void TaskOrder::setOrderType(const QString& value) { orderType = value; }
|
||||
QString TaskOrder::getOrderType() const { return orderType; }
|
||||
|
||||
void TaskCollect::LoadTaskCollect(QJsonDocument& doc, QString message)
|
||||
{
|
||||
|
||||
this->Currnettasklist.clear();
|
||||
|
||||
if (doc["msg"].toString().contains("SUCCESS")) {
|
||||
qDebug() << "state SUCCESS";
|
||||
this->state = WBTASKSAPIREQURSTSTATE::SUCCESS;
|
||||
|
||||
this->total = doc["total"].toInt();
|
||||
this->pagenum = doc["pagenum"].toInt();
|
||||
|
||||
QJsonValue data = doc["data"];
|
||||
if (data.isArray()) {
|
||||
|
||||
QJsonArray datalist = data.toArray();
|
||||
|
||||
for (size_t i = 0; i < datalist.count(); i++) {
|
||||
QJsonObject jsonObj = datalist.at(i).toObject();
|
||||
|
||||
if (jsonObj.contains("ordertype") && !(jsonObj["ordertype"].isNull()) && (jsonObj["ordertype"].toString().contains(QString(u8"微波仿真订单"))))
|
||||
{
|
||||
TaskOrder neworder(jsonObj);
|
||||
this->Currnettasklist.append(neworder);
|
||||
}
|
||||
else {
|
||||
//qDebug() << jsonObj.contains("ordertype") <<" "<< !(jsonObj["ordertype"].isNull()) <<" "<<(jsonObj["ordertype"].toString().contains(QString(u8"微波仿真订单")))<<" "<< jsonObj["ordertype"].toString();
|
||||
//TaskOrder neworder(jsonObj);
|
||||
//this->Currnettasklist.append(neworder);
|
||||
}
|
||||
}
|
||||
this->pagecount = this->Currnettasklist.count();
|
||||
qDebug() << "load data array , count " << this->pagecount;
|
||||
}
|
||||
else {
|
||||
this->pagecount = 0;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
qDebug() << "state not SUCCESS";
|
||||
this->state = WBTASKSAPIREQURSTSTATE::FAIL;
|
||||
this->total = 0;
|
||||
this->pagenum = 0;
|
||||
this->pagecount = 0;
|
||||
}
|
||||
this->pagecount = this->Currnettasklist.count();
|
||||
emit this->updateSIG(this->state,message);
|
||||
}
|
||||
|
||||
void TaskCollect::LoadTaskCollectState(QString message)
|
||||
{
|
||||
this->clear();
|
||||
this->state= WBTASKSAPIREQURSTSTATE::ERROR;
|
||||
emit this->updateSIG(this->state, message);
|
||||
}
|
||||
|
||||
TaskCollect* TaskCollect::getInstance()
|
||||
{
|
||||
|
||||
if (nullptr == TaskCollect::instance) {
|
||||
TaskCollect::instance = new TaskCollect;
|
||||
}
|
||||
else {}
|
||||
return TaskCollect::instance;
|
||||
}
|
||||
|
||||
int TaskCollect::clear()
|
||||
{
|
||||
this->state = WBTASKSAPIREQURSTSTATE::FAIL;
|
||||
this->total = 0;
|
||||
this->pagenum = 0;
|
||||
this->pagecount = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int TaskCollect::getPagenum()
|
||||
{
|
||||
return this->pagenum;
|
||||
}
|
||||
|
||||
int TaskCollect::getTotal()
|
||||
{
|
||||
return this->total;
|
||||
}
|
||||
|
||||
int TaskCollect::getPagecount()
|
||||
{
|
||||
return this->pagecount;
|
||||
}
|
||||
|
||||
TaskOrder* TaskCollect::getCurrentTaskAt(int i)
|
||||
{
|
||||
return &this->Currnettasklist[i];
|
||||
}
|
||||
|
||||
TaskCollect::TaskCollect() {
|
||||
this->state = WBTASKSAPIREQURSTSTATE::FAIL;
|
||||
this->total = 0;
|
||||
this->pagenum = 0;
|
||||
this->pagecount = 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
#pragma once
|
||||
#ifndef ORDER_H
|
||||
#define ORDER_H
|
||||
|
||||
#include <QString>
|
||||
#include <qjsonobject.h>
|
||||
#include <qobject.h>
|
||||
|
||||
namespace WBFZTASK {
|
||||
|
||||
enum WBTASKSAPIREQURSTSTATE {
|
||||
FAIL,
|
||||
SUCCESS,
|
||||
ERROR
|
||||
};
|
||||
|
||||
|
||||
class TaskOrder {
|
||||
private:
|
||||
QString createTime;
|
||||
QString orderStatus;
|
||||
int orderId;
|
||||
QString orderMode;
|
||||
QString ip;
|
||||
QString orderDownloadAddr;
|
||||
QString userId;
|
||||
QString demand;
|
||||
QString orderSource;
|
||||
QString applicant;
|
||||
QString intention;
|
||||
QString orderStoreProcess;
|
||||
QString orderCode;
|
||||
QString qrstCode;
|
||||
QString contactInfo;
|
||||
QString orderDetails;
|
||||
QString company;
|
||||
QString dataSize;
|
||||
QString updateTime;
|
||||
QString orderType;
|
||||
|
||||
public:
|
||||
// 构造函数
|
||||
TaskOrder();
|
||||
TaskOrder(const QJsonObject& jsonObj);
|
||||
|
||||
// Getter 和 Setter 方法
|
||||
void setCreateTime(const QString& value);
|
||||
QString getCreateTime() const;
|
||||
|
||||
void setOrderStatus(const QString& value);
|
||||
QString getOrderStatus() const;
|
||||
|
||||
void setOrderId(int value);
|
||||
int getOrderId() const;
|
||||
|
||||
void setOrderMode(const QString& value);
|
||||
QString getOrderMode() const;
|
||||
|
||||
void setIp(const QString& value);
|
||||
QString getIp() const;
|
||||
|
||||
void setOrderDownloadAddr(const QString& value);
|
||||
QString getOrderDownloadAddr() const;
|
||||
|
||||
void setUserId(const QString& value);
|
||||
QString getUserId() const;
|
||||
|
||||
void setDemand(const QString& value);
|
||||
QString getDemand() const;
|
||||
|
||||
void setOrderSource(const QString& value);
|
||||
QString getOrderSource() const;
|
||||
|
||||
void setApplicant(const QString& value);
|
||||
QString getApplicant() const;
|
||||
|
||||
void setIntention(const QString& value);
|
||||
QString getIntention() const;
|
||||
|
||||
void setOrderStoreProcess(const QString& value);
|
||||
QString getOrderStoreProcess() const;
|
||||
|
||||
void setOrderCode(const QString& value);
|
||||
QString getOrderCode() const;
|
||||
|
||||
void setQrstCode(const QString& value);
|
||||
QString getQrstCode() const;
|
||||
|
||||
void setContactInfo(const QString& value);
|
||||
QString getContactInfo() const;
|
||||
|
||||
void setOrderDetails(const QString& value);
|
||||
QString getOrderDetails() const;
|
||||
|
||||
void setCompany(const QString& value);
|
||||
QString getCompany() const;
|
||||
|
||||
void setDataSize(const QString& value);
|
||||
QString getDataSize() const;
|
||||
|
||||
void setUpdateTime(const QString& value);
|
||||
QString getUpdateTime() const;
|
||||
|
||||
void setOrderType(const QString& value);
|
||||
QString getOrderType() const;
|
||||
};
|
||||
|
||||
|
||||
class TaskCollect:public QObject {
|
||||
Q_OBJECT
|
||||
private:
|
||||
TaskCollect();
|
||||
public:
|
||||
void LoadTaskCollect(QJsonDocument& d,QString message);
|
||||
void LoadTaskCollectState(QString message);
|
||||
static TaskCollect* getInstance();
|
||||
|
||||
int clear();
|
||||
|
||||
int getPagenum();
|
||||
int getTotal();
|
||||
int getPagecount();
|
||||
TaskOrder* getCurrentTaskAt(int i);
|
||||
|
||||
signals:
|
||||
void updateSIG(WBTASKSAPIREQURSTSTATE state,QString message);
|
||||
|
||||
|
||||
private:
|
||||
QList<TaskOrder> Currnettasklist;
|
||||
int pagenum;// 当前page 的 枚举
|
||||
int total;// 总共订单总数
|
||||
int pagecount;// 每页订单数量
|
||||
WBTASKSAPIREQURSTSTATE state;// 状态
|
||||
static TaskCollect* instance;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // ORDER_H
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#include <QApplication>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include "LAMPWBDDManager.h"
|
||||
#include "LAMPTaskManagerMainWindows.h"
|
||||
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
WBFZTASK::LAMPTaskManagerMainWindows mainwindows ;
|
||||
mainwindows.setWindowTitle(u8"菓꺼력廬땐데꿴璂溝固");
|
||||
mainwindows.show();
|
||||
|
||||
return a.exec();
|
||||
}
|
Loading…
Reference in New Issue