Commit 7a2db306 by 刘帅

支付退款(未完成)

parent 6559cad5
...@@ -26,12 +26,16 @@ CONFIG(debug, debug|release){ ...@@ -26,12 +26,16 @@ CONFIG(debug, debug|release){
SOURCES += main.cpp\ SOURCES += main.cpp\
widget.cpp \ widget.cpp \
qfmclient.cpp qfmclient.cpp \
scanner.cpp
HEADERS += widget.h \ HEADERS += widget.h \
fmcrypt.h \ fmcrypt.h \
qfmclient.h \ qfmclient.h \
app_single.h \ app_single.h \
log.h log.h \
utility.h \
scanner.h
FORMS += widget.ui FORMS += widget.ui \
scanner.ui
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <QWidget> #include <QWidget>
#include <QDir> #include <QDir>
#include "QsLog/QsLog.h" #include "QsLog/QsLog.h"
#include "utility.h"
#ifdef WIN32 #ifdef WIN32
#include <direct.h> #include <direct.h>
...@@ -778,6 +779,11 @@ void QFmClient::BackupPosReq(char * req) ...@@ -778,6 +779,11 @@ void QFmClient::BackupPosReq(char * req)
} }
} }
QString QFmClient::GetInputfmId()
{
}
void QFmClient::run() void QFmClient::run()
{ {
if(!Init("115.159.63.201", 29534, 34952, 30, 5)) if(!Init("115.159.63.201", 29534, 34952, 30, 5))
......
...@@ -51,6 +51,8 @@ private: ...@@ -51,6 +51,8 @@ private:
int ProcessZhProxyRspDataAndSend2Pos(); int ProcessZhProxyRspDataAndSend2Pos();
int CheckRecvedData(); int CheckRecvedData();
void BackupPosReq(char *req); void BackupPosReq(char *req);
QString GetInputfmId(); //退款流程1, 从输入获取长码
private: private:
bool _endflag; bool _endflag;
......
#include "scanner.h"
#include "ui_scanner.h"
scanner::scanner(QWidget *parent) :
QWidget(parent),
ui(new Ui::scanner)
{
ui->setupUi(this);
}
scanner::~scanner()
{
delete ui;
}
bool scanner::eventFilter(QObject *obj, QEvent *event)
{
if (obj == fmId_edit) {
if (event->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
qDebug() << "key press" << keyEvent->key();
return true;
} else {
return false;
}
} else {
// pass the event on to the parent class
return QWidget::eventFilter(obj, event);
}
}
#ifndef SCANNER_H
#define SCANNER_H
#include <QWidget>
namespace Ui {
class scanner;
}
class scanner : public QWidget
{
Q_OBJECT
public:
explicit scanner(QWidget *parent = 0);
~scanner();
private:
Ui::scanner *ui;
};
#endif // SCANNER_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>scanner</class>
<widget class="QWidget" name="scanner">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>240</height>
</rect>
</property>
<property name="windowTitle">
<string>退款条码输入</string>
</property>
<widget class="QLineEdit" name="fmId_edit">
<property name="geometry">
<rect>
<x>62</x>
<y>149</y>
<width>241</width>
<height>41</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="fmId">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>54</width>
<height>12</height>
</rect>
</property>
<property name="text">
<string>fmId</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>
#ifndef UTILITY
#define UTILITY
#endif // UTILITY
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment