提交信息!
This commit is contained in:
@@ -38,8 +38,8 @@ void QDataManagementWidget::initWidgets()
|
||||
pLayoutScrollArea = new QGridLayout;
|
||||
pLayout = new QGridLayout;
|
||||
|
||||
pLayout->setMargin(0);
|
||||
pLayoutScrollArea->setMargin(0);
|
||||
pLayout->setMargin( 0 );
|
||||
pLayoutScrollArea->setMargin( 0 );
|
||||
|
||||
pLayout->addWidget( &achievementWidget );
|
||||
pLayoutScrollArea->addWidget( pScrollArea );
|
||||
@@ -47,56 +47,56 @@ void QDataManagementWidget::initWidgets()
|
||||
ui.pCarDealerAchievementTab->setLayout( pLayoutScrollArea );
|
||||
|
||||
//车商方案表
|
||||
pScrollArea = new QScrollArea(nullptr);
|
||||
pScrollArea = new QScrollArea( nullptr );
|
||||
pLayoutScrollArea = new QGridLayout();
|
||||
pLayout = new QGridLayout();
|
||||
pLayout = new QGridLayout();
|
||||
|
||||
pLayoutScrollArea->setMargin(0);
|
||||
pLayout->setMargin(0);
|
||||
pLayoutScrollArea->setMargin( 0 );
|
||||
pLayout->setMargin( 0 );
|
||||
|
||||
pLayout->addWidget(&schemaWidget);
|
||||
pLayoutScrollArea->addWidget(pScrollArea);
|
||||
pScrollArea->setLayout(pLayout);
|
||||
ui.pCarDealerSchemaTab->setLayout(pLayoutScrollArea);
|
||||
pLayout->addWidget( &schemaWidget );
|
||||
pLayoutScrollArea->addWidget( pScrollArea );
|
||||
pScrollArea->setLayout( pLayout );
|
||||
ui.pCarDealerSchemaTab->setLayout( pLayoutScrollArea );
|
||||
|
||||
//卢霖城送返修推荐表
|
||||
pScrollArea = new QScrollArea(nullptr);
|
||||
pScrollArea = new QScrollArea( nullptr );
|
||||
pLayoutScrollArea = new QGridLayout();
|
||||
pLayout = new QGridLayout();
|
||||
pLayout = new QGridLayout();
|
||||
|
||||
pLayoutScrollArea->setMargin(0);
|
||||
pLayout->setMargin(0);
|
||||
pLayoutScrollArea->setMargin( 0 );
|
||||
pLayout->setMargin( 0 );
|
||||
|
||||
pLayout->addWidget(&repairRecommendationWidget);
|
||||
pLayoutScrollArea->addWidget(pScrollArea);
|
||||
pScrollArea->setLayout(pLayout);
|
||||
ui.pRepairRecommandationTab->setLayout(pLayoutScrollArea);
|
||||
pLayout->addWidget( &repairRecommendationWidget );
|
||||
pLayoutScrollArea->addWidget( pScrollArea );
|
||||
pScrollArea->setLayout( pLayout );
|
||||
ui.pRepairRecommandationTab->setLayout( pLayoutScrollArea );
|
||||
|
||||
//新送返修监控
|
||||
pScrollArea = new QScrollArea(nullptr);
|
||||
pScrollArea = new QScrollArea( nullptr );
|
||||
pLayoutScrollArea = new QGridLayout();
|
||||
pLayout = new QGridLayout();
|
||||
pLayout = new QGridLayout();
|
||||
|
||||
pLayoutScrollArea->setMargin(0);
|
||||
pLayout->setMargin(0);
|
||||
pLayoutScrollArea->setMargin( 0 );
|
||||
pLayout->setMargin( 0 );
|
||||
|
||||
pLayout->addWidget(&repairRecommendationWidget);
|
||||
pLayoutScrollArea->addWidget(pScrollArea);
|
||||
pScrollArea->setLayout(pLayout);
|
||||
ui.pNewRepairMonitorTab->setLayout(pLayoutScrollArea);
|
||||
pLayout->addWidget( &newRepairMonitorWidget );
|
||||
pLayoutScrollArea->addWidget( pScrollArea );
|
||||
pScrollArea->setLayout( pLayout );
|
||||
ui.pNewRepairMonitorTab->setLayout( pLayoutScrollArea );
|
||||
|
||||
//送返修工单
|
||||
pScrollArea = new QScrollArea(nullptr);
|
||||
pScrollArea = new QScrollArea( nullptr );
|
||||
pLayoutScrollArea = new QGridLayout();
|
||||
pLayout = new QGridLayout();
|
||||
pLayout = new QGridLayout();
|
||||
|
||||
pLayoutScrollArea->setMargin(0);
|
||||
pLayout->setMargin(0);
|
||||
pLayoutScrollArea->setMargin( 0 );
|
||||
pLayout->setMargin( 0 );
|
||||
|
||||
pLayout->addWidget(&repairRecommendationWidget);
|
||||
pLayoutScrollArea->addWidget(pScrollArea);
|
||||
pScrollArea->setLayout(pLayout);
|
||||
ui.pRepairOrderTab->setLayout(pLayoutScrollArea);
|
||||
pLayout->addWidget( &repairOrderWidget );
|
||||
pLayoutScrollArea->addWidget( pScrollArea );
|
||||
pScrollArea->setLayout( pLayout );
|
||||
ui.pRepairOrderTab->setLayout( pLayoutScrollArea );
|
||||
}
|
||||
|
||||
void QDataManagementWidget::initSignal()
|
||||
|
@@ -4,6 +4,8 @@
|
||||
#include "ui_QDataManagementWidget.h"
|
||||
#include "QCarDealerAchievementWidget.h"
|
||||
#include "QCarDealerSchemaWidget.h"
|
||||
#include "QRepairOrderWidget.h"
|
||||
#include "../QNewRepairMonitorWidget/QNewRepairMonitorWidget.h"
|
||||
#include "../QRepairRecommendationWidget/QRepairRecommendationWidget.h"
|
||||
|
||||
class QDataManagementWidget : public QWidget
|
||||
@@ -26,4 +28,6 @@ private:
|
||||
QCarDealerAchievementWidget achievementWidget;
|
||||
QCarDealerSchemaWidget schemaWidget;
|
||||
QRepairRecommendationWidget repairRecommendationWidget;
|
||||
QRepairOrderWidget repairOrderWidget;
|
||||
QNewRepairMonitorWidget newRepairMonitorWidget;
|
||||
};
|
||||
|
@@ -0,0 +1,11 @@
|
||||
#include "QNewRepairMonitorWidget.h"
|
||||
|
||||
QNewRepairMonitorWidget::QNewRepairMonitorWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
}
|
||||
|
||||
QNewRepairMonitorWidget::~QNewRepairMonitorWidget()
|
||||
{
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include "ui_QNewRepairMonitorWidget.h"
|
||||
|
||||
class QNewRepairMonitorWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QNewRepairMonitorWidget(QWidget *parent = Q_NULLPTR);
|
||||
~QNewRepairMonitorWidget();
|
||||
|
||||
private:
|
||||
Ui::QNewRepairMonitorWidget ui;
|
||||
};
|
@@ -0,0 +1,23 @@
|
||||
<UI version="4.0" >
|
||||
<class>QNewRepairMonitorWidget</class>
|
||||
<widget class="QWidget" name="QNewRepairMonitorWidget" >
|
||||
<property name="objectName" >
|
||||
<string notr="true">QNewRepairMonitorWidget</string>
|
||||
</property>
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>QNewRepairMonitorWidget</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</UI>
|
@@ -1,11 +1,120 @@
|
||||
#include <QFileDialog>
|
||||
#include <stdexcept>
|
||||
#include "QRepairOrderWidget.h"
|
||||
#include <QMessageBox>
|
||||
#include "../../Data/DataManipulation/Excel/LoadFromExcel.h"
|
||||
#include "../../Data/DataManipulation/oracle/ImportToOracle.h"
|
||||
#include "../../util/qt/qt_util.h"
|
||||
|
||||
QRepairOrderWidget::QRepairOrderWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
using namespace std;
|
||||
|
||||
QRepairOrderWidget::QRepairOrderWidget( QWidget * parent )
|
||||
: QWidget( parent )
|
||||
{
|
||||
ui.setupUi(this);
|
||||
ui.setupUi( this );
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
QRepairOrderWidget::~QRepairOrderWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void QRepairOrderWidget::onImport()
|
||||
{
|
||||
QString fileDir = ".";
|
||||
QString dialogCaption = "打开文件";
|
||||
QString filter = "Excel文件 (*.xlsx)";
|
||||
//QStringList fileList;
|
||||
|
||||
try
|
||||
{
|
||||
//读取文件
|
||||
QStringList fileList = QFileDialog::getOpenFileNames( nullptr,
|
||||
dialogCaption,
|
||||
fileDir,
|
||||
filter );
|
||||
|
||||
if ( fileList.count() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//清理旧数据
|
||||
repairOrderVector.clear();
|
||||
|
||||
for ( auto iterFile = fileList.begin();
|
||||
iterFile != fileList.end();
|
||||
++iterFile )
|
||||
{
|
||||
LoadRepairOrderFromXlsx( iterFile->toStdWString(),
|
||||
0,
|
||||
1,
|
||||
repairOrderVector );
|
||||
}
|
||||
}
|
||||
catch ( runtime_error & error )
|
||||
{
|
||||
QMessageBox::critical( nullptr,
|
||||
"读取失败!",
|
||||
"数据读取失败!" );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//如果没有读取任何记录,就退出!
|
||||
if ( repairOrderVector.size() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//写入数据
|
||||
try
|
||||
{
|
||||
//以后要修改
|
||||
string userName = "car_dealer";
|
||||
string password = "cpic123456";
|
||||
string tnsName = "xmcx1";
|
||||
|
||||
ImportRepairOrderToOracle( userName,
|
||||
password,
|
||||
tnsName,
|
||||
repairOrderVector );
|
||||
|
||||
showRepairOrder();
|
||||
}
|
||||
catch ( runtime_error & error )
|
||||
{
|
||||
QMessageBox::critical( nullptr,
|
||||
"写入失败",
|
||||
QString::fromLocal8Bit( error.what() ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void QRepairOrderWidget::init()
|
||||
{
|
||||
initData();
|
||||
initWidgets();
|
||||
initSignal();
|
||||
}
|
||||
|
||||
void QRepairOrderWidget::initData()
|
||||
{
|
||||
}
|
||||
|
||||
void QRepairOrderWidget::initWidgets()
|
||||
{
|
||||
setLayout( ui.pLayoutMain );
|
||||
}
|
||||
|
||||
void QRepairOrderWidget::initSignal()
|
||||
{
|
||||
connect( ui.pButtonImport, SIGNAL( clicked() ), this, SLOT( onImport() ) );
|
||||
}
|
||||
|
||||
void QRepairOrderWidget::showRepairOrder()
|
||||
{
|
||||
}
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include "ui_QRepairOrderWidget.h"
|
||||
#include "../../Data/Datastructure/RepairOrder/RepairOrder.h"
|
||||
|
||||
class QRepairOrderWidget : public QWidget
|
||||
{
|
||||
@@ -11,6 +12,18 @@ public:
|
||||
QRepairOrderWidget(QWidget *parent = Q_NULLPTR);
|
||||
~QRepairOrderWidget();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void onImport();
|
||||
|
||||
private:
|
||||
void init();
|
||||
void initData();
|
||||
void initWidgets();
|
||||
void initSignal();
|
||||
void showRepairOrder();
|
||||
|
||||
private:
|
||||
Ui::QRepairOrderWidget ui;
|
||||
|
||||
std::vector<RepairOrder> repairOrderVector;
|
||||
};
|
||||
|
@@ -1,23 +1,303 @@
|
||||
<UI version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QRepairOrderWidget</class>
|
||||
<widget class="QWidget" name="QRepairOrderWidget" >
|
||||
<property name="objectName" >
|
||||
<string notr="true">QRepairOrderWidget</string>
|
||||
</property>
|
||||
<property name="geometry" >
|
||||
<widget class="QWidget" name="QRepairOrderWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>666</width>
|
||||
<height>445</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>QRepairOrderWidget</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>10</y>
|
||||
<width>581</width>
|
||||
<height>331</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="pLayoutMain">
|
||||
<property name="leftMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QToolButton" name="pButtonImport">
|
||||
<property name="text">
|
||||
<string>导入</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<normalon>:/QMainFrame/Resources/excel.png</normalon>
|
||||
</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextBesideIcon</enum>
|
||||
</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>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="pTableWidgetNewRepairMonitor">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>工单号</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>工单类型</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>报案号</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>出险区域</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>出险日期</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>创建日期</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>商业险保单号</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>交强险保单号</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>车牌号</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>品牌名称</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>是否标的车</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>是否推荐成功</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>推荐车商代码</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>推荐车商名称</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>报案推荐车商</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>查看推荐车商</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>接报案人</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>查勘员</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>工单确认时间</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>车辆进厂时间</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>车辆出厂时间</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>状态</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>损失项目ID</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>查勘员推荐</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>状态</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
<resources/>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources>
|
||||
<include location="../../../resource.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</UI>
|
||||
</ui>
|
||||
|
Reference in New Issue
Block a user