提交信息!
This commit is contained in:
parent
7ba184a311
commit
99b3a4ef41
@ -1,16 +1,60 @@
|
||||
#include "QCarDealerSchemaWidget.h"
|
||||
|
||||
QCarDealerSchemaWidget::QCarDealerSchemaWidget(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
#include "../../../Data/DataManipulation/Excel/LoadFromExcel.h"
|
||||
#include "../../../Data/DataManipulation/oracle/ImportToOracle.h"
|
||||
#include "../../util/qt/qt_util.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
QCarDealerSchemaWidget::QCarDealerSchemaWidget( QWidget * parent )
|
||||
: QWidget( parent )
|
||||
{
|
||||
ui.setupUi(this);
|
||||
ui.setupUi( this );
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
QCarDealerSchemaWidget::~QCarDealerSchemaWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QCarDealerSchemaWidget::onImport()
|
||||
{
|
||||
//选择文件
|
||||
QString xlsxFilePath = QFileDialog::getOpenFileName(this,
|
||||
"请选择要导入的数据文件",
|
||||
".", "xlsx文件(*.xlsx)");
|
||||
if (xlsxFilePath.isEmpty() == true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
schemeVector.clear();
|
||||
|
||||
LoadCarDealerSchemeFromXlsx(xlsxFilePath.toStdWString(),
|
||||
0,
|
||||
1,
|
||||
schemeVector);
|
||||
|
||||
//以后要修改
|
||||
string userName = "car_dealer";
|
||||
string password = "cpic123456";
|
||||
string tnsName = "xmcx1";
|
||||
|
||||
try
|
||||
{
|
||||
ImportCarDealerSchemeToOracle(userName, password, tnsName, schemeVector);
|
||||
|
||||
//showCarDealerAchievement();
|
||||
}
|
||||
catch (runtime_error& error)
|
||||
{
|
||||
QMessageBox::critical(this,
|
||||
"错误",
|
||||
error.what());
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void QCarDealerSchemaWidget::init()
|
||||
@ -26,9 +70,13 @@ void QCarDealerSchemaWidget::initData()
|
||||
|
||||
void QCarDealerSchemaWidget::initWidgets()
|
||||
{
|
||||
setLayout(ui.pLayoutMain);
|
||||
setLayout( ui.pLayoutMain );
|
||||
|
||||
resizeTableWidgetTab( ui.pTableWidgetAchievement, 10 );
|
||||
}
|
||||
|
||||
void QCarDealerSchemaWidget::initSignal()
|
||||
{
|
||||
connect( ui.pButtonImport, SIGNAL( clicked() ), this, SLOT( onImport() ) );
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
#include <vector>
|
||||
#include "ui_QCarDealerSchemaWidget.h"
|
||||
#include "../../Data/Datastructure/CarDealerScheme/CarDealerScheme.h"
|
||||
|
||||
|
||||
class QCarDealerSchemaWidget : public QWidget
|
||||
{
|
||||
@ -11,6 +14,9 @@ public:
|
||||
QCarDealerSchemaWidget(QWidget *parent = Q_NULLPTR);
|
||||
~QCarDealerSchemaWidget();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void onImport();
|
||||
|
||||
private:
|
||||
void init();
|
||||
void initData();
|
||||
@ -19,4 +25,6 @@ private:
|
||||
|
||||
private:
|
||||
Ui::QCarDealerSchemaWidget ui;
|
||||
|
||||
std::vector<CarDealerScheme> schemeVector;
|
||||
};
|
||||
|
@ -106,7 +106,7 @@
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>店内双签产值(万元)</string>
|
||||
<string>工时标准</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
@ -114,7 +114,7 @@
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>店内新车开票数</string>
|
||||
<string>配件价格</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
@ -122,7 +122,7 @@
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>我司新车签单台次</string>
|
||||
<string>其他理赔支持</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
@ -130,7 +130,7 @@
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>人保新车签单台次</string>
|
||||
<string>营销活动方案</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
@ -138,15 +138,7 @@
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>平安新车签单台次</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>其他保险公司新车签单台次</string>
|
||||
<string>是否达成预期</string>
|
||||
</property>
|
||||
<property name="textAlignment">
|
||||
<set>AlignCenter</set>
|
||||
|
Loading…
x
Reference in New Issue
Block a user