Commit 9426a791 by gujin.wang

在支付界面上添加卡券核销功能

parent c0c3e4f6
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "fmp_epay_checkmodel.h" #include "fmp_epay_checkmodel.h"
#include "fmp_epay_plugin_p.h" #include "fmp_epay_plugin_p.h"
#include "fmp_forceclose_dialog.h" #include "fmp_forceclose_dialog.h"
#include "fmp_redeem_i.h"
#include <QDebug> #include <QDebug>
#include <fmp_settings_i.h> #include <fmp_settings_i.h>
...@@ -16,7 +17,8 @@ ...@@ -16,7 +17,8 @@
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include <QPushButton>
#include <QVBoxLayout>
FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWidget *parent) : FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWidget *parent) :
_control(control), _control(control),
...@@ -25,7 +27,6 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid ...@@ -25,7 +27,6 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid
{ {
ui->setupUi(this); ui->setupUi(this);
//this->setWindowIconText(QString::fromLocal8Bit("非码支付")); //this->setWindowIconText(QString::fromLocal8Bit("非码支付"));
this->setWindowTitle(QString::fromLocal8Bit("非码支付")); this->setWindowTitle(QString::fromLocal8Bit("非码支付"));
...@@ -179,6 +180,11 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid ...@@ -179,6 +180,11 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid
// ui->btn_refund->setEnabled(false); // ui->btn_refund->setEnabled(false);
// ui->btn_pay->setEnabled(false); // ui->btn_pay->setEnabled(false);
} }
QPushButton* redeem = new QPushButton(QString::fromLocal8Bit("卡券支付"), this);
redeem->setStyleSheet("width:250px");
connect(redeem, &QPushButton::clicked, this, &FMPPayDialog::redeem);
QVBoxLayout* layout = qobject_cast<QVBoxLayout*>(ui->frame->layout());
layout->insertWidget(4, redeem);
setShowFunc(); setShowFunc();
} }
...@@ -1087,5 +1093,20 @@ void FMPPayDialog::setShowFunc() ...@@ -1087,5 +1093,20 @@ void FMPPayDialog::setShowFunc()
//setWaitPayView(); //setWaitPayView();
ui->btn_waitPay->click(); ui->btn_waitPay->click();
} }
}
#ifdef Q_OS_WIN
//!命名冲突
#undef StartService
#endif
void FMPPayDialog::redeem()
{
FMPRedeemInterface* redeem = FMP::GetService<FMPRedeemInterface>();
redeem->StartService();
QJsonObject storeInfo;
storeInfo["store_id"] = "99998";
storeInfo["station_id"] = 1;
storeInfo["operator_id"] = "00000002";
QJsonObject result = redeem->Redeem(storeInfo);
qDebug() << result;
} }
...@@ -99,6 +99,8 @@ private slots: ...@@ -99,6 +99,8 @@ private slots:
void on_btn_waitPay_pay_clicked(); void on_btn_waitPay_pay_clicked();
void on_btn_waitPay_close_clicked(); void on_btn_waitPay_close_clicked();
void redeem();
public: public:
void setPayView(); void setPayView();
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#define VER_MINOR 1 #define VER_MINOR 1
#define VER_REVISION 0 #define VER_REVISION 0
#define VER_BUILD 17 #define VER_BUILD 19
//! Convert version numbers to string //! Convert version numbers to string
#define _STR(S) #S #define _STR(S) #S
......
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