Commit e2c9e349 by xiaoqing.gu

插件功能开发完毕:1、会员积分界面 2、积分订单界面 3、界面不可重复打开 4、优惠券显示券号

parent e3539e14
...@@ -51,3 +51,11 @@ void FMPVip::list() ...@@ -51,3 +51,11 @@ void FMPVip::list()
d_func()->list(); d_func()->list();
} }
} }
bool FMPVip::isBusy()
{
if (_inited) {
return d_func()->isBusy();
}
return false;
}
...@@ -20,6 +20,8 @@ public: ...@@ -20,6 +20,8 @@ public:
void pay(); void pay();
void list(); void list();
bool isBusy();
protected: protected:
void InitService(); void InitService();
void UninitService(); void UninitService();
......
...@@ -20,6 +20,7 @@ public: ...@@ -20,6 +20,7 @@ public:
} }
virtual void pay() = 0; virtual void pay() = 0;
virtual void list() = 0; virtual void list() = 0;
virtual bool isBusy() = 0;
signals: signals:
void TriggerInit(); void TriggerInit();
void TriggerUninit(); void TriggerUninit();
......
...@@ -28,6 +28,7 @@ int FMPVipPrivate::Init() ...@@ -28,6 +28,7 @@ int FMPVipPrivate::Init()
auto resend = new ReSend(); auto resend = new ReSend();
resend->start(); resend->start();
FMPVipServer::instance()->SetPluginContext(q->_ctx); FMPVipServer::instance()->SetPluginContext(q->_ctx);
q->_inited = true; q->_inited = true;
...@@ -60,9 +61,13 @@ void FMPVipPrivate::pay() ...@@ -60,9 +61,13 @@ void FMPVipPrivate::pay()
void FMPVipPrivate::list() void FMPVipPrivate::list()
{ {
Q_Q(FMPVip); Q_Q(FMPVip);
QByteArray rspData; QByteArray rspData;
FMPVipServer::instance()->callVipPay("{\"fm_cmd\":10035}",rspData); FMPVipServer::instance()->callVipPay("{\"fm_cmd\":10036}",rspData);
}
bool FMPVipPrivate::isBusy()
{
return FMPVipServer::instance()->IsBusy();
} }
......
...@@ -19,6 +19,8 @@ public: ...@@ -19,6 +19,8 @@ public:
void pay(); void pay();
void list(); void list();
bool isBusy();
public: public:
FMPVip *q_ptr; FMPVip *q_ptr;
private: private:
......
...@@ -13,7 +13,8 @@ FMPVipServer *FMPVipServer::instance() ...@@ -13,7 +13,8 @@ FMPVipServer *FMPVipServer::instance()
FMPVipServer::FMPVipServer() : FMPVipServer::FMPVipServer() :
QTcpServer(), QTcpServer(),
socket(nullptr), socket(nullptr),
dispatcher(new FMVipDispatcher(this)) dispatcher(new FMVipDispatcher(this)),
_isBusy(false)
{ {
Listen(23770); Listen(23770);
connect(this, &QTcpServer::newConnection, this, &FMPVipServer::onNewConnection); connect(this, &QTcpServer::newConnection, this, &FMPVipServer::onNewConnection);
...@@ -48,6 +49,7 @@ void FMPVipServer::SetPluginContext(ctkPluginContext *ctx) ...@@ -48,6 +49,7 @@ void FMPVipServer::SetPluginContext(ctkPluginContext *ctx)
void FMPVipServer::onNewConnection() void FMPVipServer::onNewConnection()
{ {
_isBusy = true;
socket = nextPendingConnection(); socket = nextPendingConnection();
connect(socket, &QTcpSocket::disconnected, this, &FMPVipServer::onDisconnected); connect(socket, &QTcpSocket::disconnected, this, &FMPVipServer::onDisconnected);
...@@ -57,6 +59,7 @@ void FMPVipServer::onNewConnection() ...@@ -57,6 +59,7 @@ void FMPVipServer::onNewConnection()
void FMPVipServer::onDisconnected() void FMPVipServer::onDisconnected()
{ {
FMP_DEBUG() << "Socket disconnected."; FMP_DEBUG() << "Socket disconnected.";
_isBusy = false;
if(dispatcher!=nullptr) { if(dispatcher!=nullptr) {
dispatcher->stopTask(); dispatcher->stopTask();
...@@ -67,6 +70,7 @@ void FMPVipServer::onDisconnected() ...@@ -67,6 +70,7 @@ void FMPVipServer::onDisconnected()
void FMPVipServer::onReadyRead() void FMPVipServer::onReadyRead()
{ {
_isBusy = true;
QByteArray recvData; QByteArray recvData;
int needLen = -1, totalLen=0, dataLen = 0; int needLen = -1, totalLen=0, dataLen = 0;
...@@ -127,5 +131,12 @@ void FMPVipServer::onReadyRead() ...@@ -127,5 +131,12 @@ void FMPVipServer::onReadyRead()
void FMPVipServer::callVipPay(const QByteArray &reqData, QByteArray &rspData) void FMPVipServer::callVipPay(const QByteArray &reqData, QByteArray &rspData)
{ {
_isBusy = true;
dispatcher->doTask(reqData,rspData); dispatcher->doTask(reqData,rspData);
_isBusy = false;
}
bool FMPVipServer::IsBusy()
{
return _isBusy;
} }
...@@ -28,6 +28,8 @@ public: ...@@ -28,6 +28,8 @@ public:
void callVipPay(const QByteArray &reqData, QByteArray &rspData); void callVipPay(const QByteArray &reqData, QByteArray &rspData);
bool IsBusy();
signals: signals:
void SocketDisconnected(); void SocketDisconnected();
...@@ -43,6 +45,8 @@ private: ...@@ -43,6 +45,8 @@ private:
FMVipDispatcher *dispatcher; FMVipDispatcher *dispatcher;
bool isNeedSocketHeader; bool isNeedSocketHeader;
bool _isBusy;
}; };
#endif // FMP_VIP_SERVER_H #endif // FMP_VIP_SERVER_H
...@@ -11,7 +11,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets ...@@ -11,7 +11,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11 CONFIG += c++11
DEFINES += TEST DEFINES += TEST FASTPAY
SOURCES += \ SOURCES += \
$$PWD/backup/fmbackup.cpp \ $$PWD/backup/fmbackup.cpp \
......
...@@ -111,6 +111,31 @@ void FMVipDispatcher::doTask(const QByteArray &reqData, QByteArray &rspData) ...@@ -111,6 +111,31 @@ void FMVipDispatcher::doTask(const QByteArray &reqData, QByteArray &rspData)
} }
#ifdef FASTPAY #ifdef FASTPAY
case FM_List: { case FM_List: {
if (_ctx) {
ctkServiceReference ref =_ctx->getServiceReference<FMPHomeInterface>();
FMPHomeInterface *home = _ctx->getService<FMPHomeInterface>(ref);
if(home) {
QString pn = home->partnerName();
QString pi = home->partnerId();
QString sn = home->storeName();
QString sl = home->storeId();
QString dl = home->deviceId();
QString dn = home->deviceName();
QString stationId = home->stationId();
QString operatorId = home->operatorId();
session.addData("PN", pn);
session.addData("PI", pi);
session.addData("SN", sn);
session.addData("SI", sl);
session.addData("DI", dl);
session.addData("DN", dn);
session.addData("STATIONID",stationId);
session.addData("OPERATORID",operatorId);
}
}
fmTask = new TaskList(jsonObj, &session); fmTask = new TaskList(jsonObj, &session);
rspData = fmTask->doTask(); rspData = fmTask->doTask();
session.clear(); session.clear();
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#define PUBLIC_KEY "Sign=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq+XlLmHtkvhb52GfOEXq 2oEU3eOQ2A8fEd1KX6C72aTvoY18SP5h7uMxXpbXpYPWiaLXo9x2hM89fyb4C0Sy 0kYL6Pl1J502PRyMD92TXC/4TCwpl7iwAiR+rYMbXFPNQBGk/KBKVT6XPYfyD1QG u4lmTVwhtcoJwBezh21S2vZWjvxiJ+lPCaXdb6qLBgl+4sJxzd7OZ+OavBm5tTCj ynrEV2w3KBbZ6vljAHowl2HQb0q5a6K6BktstolAfp2y/Hxx5BlUpRIRA61kLkJp nRl+eOF4n4fAv7hoczgDFPbEvgJ7MOc4IwOdzAy9whHF44i33nt4A43f+x2J+o+t 0QIDAQAB" #define PUBLIC_KEY "Sign=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq+XlLmHtkvhb52GfOEXq 2oEU3eOQ2A8fEd1KX6C72aTvoY18SP5h7uMxXpbXpYPWiaLXo9x2hM89fyb4C0Sy 0kYL6Pl1J502PRyMD92TXC/4TCwpl7iwAiR+rYMbXFPNQBGk/KBKVT6XPYfyD1QG u4lmTVwhtcoJwBezh21S2vZWjvxiJ+lPCaXdb6qLBgl+4sJxzd7OZ+OavBm5tTCj ynrEV2w3KBbZ6vljAHowl2HQb0q5a6K6BktstolAfp2y/Hxx5BlUpRIRA61kLkJp nRl+eOF4n4fAv7hoczgDFPbEvgJ7MOc4IwOdzAy9whHF44i33nt4A43f+x2J+o+t 0QIDAQAB"
#define SUCCESS_CODE 100 #define SUCCESS_CODE 100
// 请求类型的枚举值 // 请求类型的枚举值
enum FM_TYPE { enum FM_TYPE {
FM_Set_Store_Info = 1000, FM_Set_Store_Info = 1000,
...@@ -52,7 +53,9 @@ enum FM_TYPE { ...@@ -52,7 +53,9 @@ enum FM_TYPE {
FM_Coupon_Pay, FM_Coupon_Pay,
FM_Verify, FM_Verify,
FM_Reverse, FM_Reverse,
FM_Point,
FM_List, FM_List,
FM_Double,
FM_QR_Refund = 10041, FM_QR_Refund = 10041,
FM_Refund_Pay, FM_Refund_Pay,
FM_Refund_Order FM_Refund_Order
...@@ -81,7 +84,15 @@ const FMReqUrlMap::value_type FMReqUrlMapPairs[] = ...@@ -81,7 +84,15 @@ const FMReqUrlMap::value_type FMReqUrlMapPairs[] =
FMReqUrlMap::value_type(FM_Final, "order"), FMReqUrlMap::value_type(FM_Final, "order"),
FMReqUrlMap::value_type(FM_Refund_Pay, "refund"), FMReqUrlMap::value_type(FM_Refund_Pay, "refund"),
FMReqUrlMap::value_type(FM_Refund_Order, "correct"), FMReqUrlMap::value_type(FM_Refund_Order, "correct"),
#ifdef FASTPAY
FMReqUrlMap::value_type(FM_Coupon, "member/coupon/verify"),
FMReqUrlMap::value_type(FM_Verify,"coupon"),
FMReqUrlMap::value_type(FM_Point,"member/recharge/points"),
FMReqUrlMap::value_type(FM_List,"order/List?partner=sgdx"),
FMReqUrlMap::value_type(FM_Double,"order/Detail?partner=sgdx"),
#else
FMReqUrlMap::value_type(FM_Coupon, "ordercoupon"), FMReqUrlMap::value_type(FM_Coupon, "ordercoupon"),
#endif
FMReqUrlMap::value_type(FM_Fund, "recharge") FMReqUrlMap::value_type(FM_Fund, "recharge")
}; };
const FMReqUrlMap ReqUrl(FMReqUrlMapPairs, FMReqUrlMapPairs + (sizeof FMReqUrlMapPairs / sizeof FMReqUrlMapPairs[0])); const FMReqUrlMap ReqUrl(FMReqUrlMapPairs, FMReqUrlMapPairs + (sizeof FMReqUrlMapPairs / sizeof FMReqUrlMapPairs[0]));
...@@ -186,6 +197,12 @@ struct PP{ ...@@ -186,6 +197,12 @@ struct PP{
StationId = "station_id"; StationId = "station_id";
Ver = "ver"; Ver = "ver";
Reqtype = "reqtype"; Reqtype = "reqtype";
OpenId = "openid";
CouponApi = "couponApi";
OrderNo = "order_no";
CouponDiscount = "coupon_discount_amount";
PayTotalAmount = "pay_total_amount";
TotalAmount = "total_amount";
#endif #endif
} }
...@@ -283,6 +300,14 @@ struct PP{ ...@@ -283,6 +300,14 @@ struct PP{
QString StationId; QString StationId;
QString Ver; QString Ver;
QString Reqtype; QString Reqtype;
QString OpenId;
QString CouponApi;
QString OrderNo;
QString CouponDiscount;
QString PayTotalAmount;
QString TotalAmount;
#endif #endif
}; };
......
...@@ -56,7 +56,7 @@ void Coupon::paint(QPainter *painter, const QRect &rect, const QPalette &palette ...@@ -56,7 +56,7 @@ void Coupon::paint(QPainter *painter, const QRect &rect, const QPalette &palette
font.setWeight(1); font.setWeight(1);
painter->setFont(font); painter->setFont(font);
QRect limitRect(rect.x(), rect.y(), rect.width(), rect.height()-flagHeight); QRect limitRect(rect.x(), rect.y(), rect.width(), rect.height()-flagHeight);
QString limitStr = QString::fromLocal8Bit("满 %1 元可用").arg(this->limitAmount()); QString limitStr = QString::fromLocal8Bit("%1").arg(this->code());//在显示券的信息的时候将满额条件修改为couponCode
painter->drawText(limitRect, Qt::AlignCenter, limitStr); painter->drawText(limitRect, Qt::AlignCenter, limitStr);
// 优惠券名 // 优惠券名
......
#include "tasklist.h" #include "tasklist.h"
#include "fmviplist.h" #include "fmviplist.h"
TaskList::TaskList(QJsonObject &jsonObj, Session *session, QObject *parent) TaskList::TaskList(QJsonObject &jsonObj, Session *session, QObject *parent)
: FMTask(jsonObj, FM_List, session, parent) : FMTask(jsonObj, FM_List, session, parent)
{ {
...@@ -20,14 +21,46 @@ void TaskList::packagePOSReq() ...@@ -20,14 +21,46 @@ void TaskList::packagePOSReq()
void TaskList::setWindow() void TaskList::setWindow()
{ {
_window = new FMVipList; _window = new FMVipList;
connect(qobject_cast<FMVipList*>(_window), SIGNAL(getList()), this, SLOT(onGetList()));
connect(qobject_cast<FMVipList*>(_window), SIGNAL(buttonClick()), this, SLOT(onButtonClick()));
// connect(qobject_cast<FMVipList*>(_window), SIGNAL(doubleClick(QString)), this, SLOT(onDoubleClick(QString)));
} }
void TaskList::packageServerReq() void TaskList::packageServerReq()
{ {
serverReqJsonObj[PosProps.StoreId] = session()->data("SI").toString();
serverReqJsonObj[PosProps.StationId] = session()->data("STATIONID").toString();
serverReqJsonObj[PosProps.PartnerId] = session()->data("PI").toString();
serverReqJsonObj[PosProps.OperatorId] = session()->data("OPERATORID").toString();
serverReqJsonObj["PageSize"] = "10";
serverReqJsonObj["PageCount"] = "1";
} }
void TaskList::packagePOSRsp() void TaskList::packagePOSRsp()
{ {
} }
void TaskList::onGetList()
{
bool isOk = sendToServer();
QJsonArray orders = getServerJsonValue("orders").toArray();
qobject_cast<FMVipList*>(_window)->getListArray(orders);
}
void TaskList::onButtonClick()
{
bool isOk = sendToServer();
QJsonArray orders = getServerJsonValue("orders").toArray();
qobject_cast<FMVipList*>(_window)->clickListArray(orders);
}
//void TaskList::onDoubleClick(const QString &id)
//{
//}
...@@ -9,10 +9,15 @@ public: ...@@ -9,10 +9,15 @@ public:
explicit TaskList(QJsonObject &jsonObj, Session *session = 0, QObject *parent = 0); explicit TaskList(QJsonObject &jsonObj, Session *session = 0, QObject *parent = 0);
~TaskList(); ~TaskList();
void packagePOSReq(); void packagePOSReq() override;
void setWindow(); void setWindow() override;
void packageServerReq(); void packageServerReq() override;
void packagePOSRsp(); void packagePOSRsp() override;
private slots:
void onGetList();
void onButtonClick();
// void onDoubleClick(const QString &id);
}; };
#endif // TASKLIST_H #endif // TASKLIST_H
...@@ -59,6 +59,8 @@ void TaskLogin::packageServerReq() ...@@ -59,6 +59,8 @@ void TaskLogin::packageServerReq()
serverReqJsonObj[PosProps.StoreId] = session()->data("SI").toString(); serverReqJsonObj[PosProps.StoreId] = session()->data("SI").toString();
serverReqJsonObj[PosProps.OperatorId] = session()->data("OPERATORID").toString();; serverReqJsonObj[PosProps.OperatorId] = session()->data("OPERATORID").toString();;
serverReqJsonObj[PosProps.Ver] = "2"; serverReqJsonObj[PosProps.Ver] = "2";
session()->addData(PosProps.TransId,transId);
#else #else
QJsonObject code; QJsonObject code;
...@@ -109,7 +111,7 @@ void TaskLogin::onLogin() ...@@ -109,7 +111,7 @@ void TaskLogin::onLogin()
return; return;
} }
#ifdef FASTPAY #ifdef FASTPAY
if(getServerJsonValue("statusCode").toInt() != SUCCESS_CODE) { if(getServerJsonValue("type").toInt() != 2 || getServerJsonValue("statusCode").toInt() != 100) {
QString info = QString::fromLocal8Bit("会员验证失败!"); QString info = QString::fromLocal8Bit("会员验证失败!");
FMP_WARN() << "Login failed: " << info; FMP_WARN() << "Login failed: " << info;
FMMsgWnd::FailureWnd(info, _window); FMMsgWnd::FailureWnd(info, _window);
......
...@@ -48,6 +48,17 @@ public: ...@@ -48,6 +48,17 @@ public:
}; };
/*积分接口*/
class TaskPoint : public FMTaskNoWnd
{
Q_OBJECT
public:
explicit TaskPoint(QJsonObject &jsonObj, Session *session = 0, QObject *parent = 0);
void packageServerReq();
void packagePOSRsp();
};
/*冲正接口*/ /*冲正接口*/
class TaskReverse : public FMTaskNoWnd class TaskReverse : public FMTaskNoWnd
{ {
......
...@@ -54,6 +54,8 @@ void TaskPay::packagePOSReq() ...@@ -54,6 +54,8 @@ void TaskPay::packagePOSReq()
#endif #endif
QString fm_open_id_pos = getPosJsonValue(PosProps.Fm_open_id).toString(); QString fm_open_id_pos = getPosJsonValue(PosProps.Fm_open_id).toString();
QString fm_open_id_session = session()->data(PosProps.Fm_open_id).toString(); QString fm_open_id_session = session()->data(PosProps.Fm_open_id).toString();
#ifndef FASTPAY
if(fm_open_id_session == "" || fm_open_id_pos!=fm_open_id_session || session()->data(PosProps.CanPay).toBool() == false) { if(fm_open_id_session == "" || fm_open_id_pos!=fm_open_id_session || session()->data(PosProps.CanPay).toBool() == false) {
preTask = new TaskLogin(posReqJsonObj, _session, this); preTask = new TaskLogin(posReqJsonObj, _session, this);
preTask->session()->addData(PosProps.FM_Type, FM_Pay); preTask->session()->addData(PosProps.FM_Type, FM_Pay);
...@@ -63,6 +65,7 @@ void TaskPay::packagePOSReq() ...@@ -63,6 +65,7 @@ void TaskPay::packagePOSReq()
} }
this->_session = preTask->session(); this->_session = preTask->session();
} }
#endif
session()->addData(PosProps.OrderAmount, getPosJsonValue(PosProps.OrderAmount).toInt()); session()->addData(PosProps.OrderAmount, getPosJsonValue(PosProps.OrderAmount).toInt());
session()->addData(PosProps.TransAmount, getPosJsonValue(PosProps.TransAmount).toInt()); session()->addData(PosProps.TransAmount, getPosJsonValue(PosProps.TransAmount).toInt());
...@@ -91,16 +94,17 @@ void TaskPay::onGetCoupons(Session* session) ...@@ -91,16 +94,17 @@ void TaskPay::onGetCoupons(Session* session)
void TaskPay::onCouponReq(const QString &code) void TaskPay::onCouponReq(const QString &code)
{ {
posReqJsonObj[PosProps.Coupon_code] = code; posReqJsonObj[PosProps.Coupon_code] = code;
session()->addData(PosProps.Coupon_code,code);
TaskCoupon couponTask(posReqJsonObj, this->session()); TaskCoupon couponTask(posReqJsonObj, this->session());
qDebug() << couponTask.doTask(); qDebug() << couponTask.doTask();
_session->addData(PosProps.CouponMap, this->session()->getCouponMap(PosProps.CouponMap)); _session->addData(PosProps.CouponMap, this->session()->getCouponMap(PosProps.CouponMap));
if(_window != nullptr) { if(_window != nullptr) {
qobject_cast<FMVipOrder*>(_window)->initCouponItems(); qobject_cast<FMVipOrder*>(_window)->initCouponItems();
qobject_cast<FMVipOrder*>(_window)->insertVip();
_window->setIsBusy(false); _window->setIsBusy(false);
_window->setEnabled(true); _window->setEnabled(true);
} }
// qDebug() << couponTask->getServerJsonValue("");
} }
#endif #endif
...@@ -109,11 +113,12 @@ void TaskPay::setWindow() ...@@ -109,11 +113,12 @@ void TaskPay::setWindow()
{ {
_window = new FMVipOrder; _window = new FMVipOrder;
connect(qobject_cast<FMVipOrder*>(_window), SIGNAL(pay()), this, SLOT(onPay()));
#ifdef FASTPAY #ifdef FASTPAY
connect(qobject_cast<FMVipOrder*>(_window),SIGNAL(couponReq(const QString &)),this,SLOT(onCouponReq(const QString &))); connect(qobject_cast<FMVipOrder*>(_window),SIGNAL(couponReq(const QString &)),this,SLOT(onCouponReq(const QString &)));
#else
connect(qobject_cast<FMVipOrder*>(_window), SIGNAL(pay()), this, SLOT(onPay()));
#endif #endif
} }
...@@ -256,9 +261,9 @@ void TaskPay::packagePOSRsp() ...@@ -256,9 +261,9 @@ void TaskPay::packagePOSRsp()
// FMMsgWnd::FailureWnd(info, _window); // FMMsgWnd::FailureWnd(info, _window);
// } // }
QJsonObject json; // QJsonObject json;
TaskCouponVerify verifyTask(json,_session); // TaskCouponVerify verifyTask(json,_session);
verifyTask.doTask(); // verifyTask.doTask();
#else #else
int status = getServerJsonValue(PosProps.StatusCode).toInt(); int status = getServerJsonValue(PosProps.StatusCode).toInt();
QString orderId = getPosJsonValue(PosProps.OrderId).toString(); QString orderId = getPosJsonValue(PosProps.OrderId).toString();
......
...@@ -20,9 +20,9 @@ FMMsgWnd::~FMMsgWnd() ...@@ -20,9 +20,9 @@ FMMsgWnd::~FMMsgWnd()
delete ui; delete ui;
} }
int FMMsgWnd::_exec(InfoType type, const QString &info) int FMMsgWnd::_exec(InfoType type, const QString &info, const QString &btn_ok_text)
{ {
ui->buttonBox->addButton(QString::fromLocal8Bit("确认"), QDialogButtonBox::AcceptRole); ui->buttonBox->addButton(btn_ok_text, QDialogButtonBox::AcceptRole);
QString iconUrl; QString iconUrl;
switch (type) { switch (type) {
case T_Normal: case T_Normal:
...@@ -43,6 +43,10 @@ int FMMsgWnd::_exec(InfoType type, const QString &info) ...@@ -43,6 +43,10 @@ int FMMsgWnd::_exec(InfoType type, const QString &info)
break; break;
case T_Question: case T_Question:
{ {
#ifdef FASTPAY
ui->label_logo->close();
ui->label_msg->setStyleSheet("QLabel{font:12 px;}");
#endif
ui->buttonBox->addButton(QString::fromLocal8Bit("取消"), QDialogButtonBox::RejectRole); ui->buttonBox->addButton(QString::fromLocal8Bit("取消"), QDialogButtonBox::RejectRole);
iconUrl = ":/img/tip_question.png"; iconUrl = ":/img/tip_question.png";
break; break;
...@@ -65,35 +69,36 @@ int FMMsgWnd::_exec(InfoType type, const QString &info) ...@@ -65,35 +69,36 @@ int FMMsgWnd::_exec(InfoType type, const QString &info)
if(iconUrl != ""){ if(iconUrl != ""){
ui->label_logo->setStyleSheet(QString("border-image: url(%1);").arg(iconUrl)); ui->label_logo->setStyleSheet(QString("border-image: url(%1);").arg(iconUrl));
} }
ui->label_msg->setText(info); ui->label_msg->setText(info);
return QDialog::exec(); return QDialog::exec();
} }
void FMMsgWnd::FailureWnd(const QString &info, QDialog *parent) void FMMsgWnd::FailureWnd(const QString &info, QDialog *parent, const QString &btn_ok_text)
{ {
FMMsgWnd window(parent); FMMsgWnd window(parent);
if(parent != nullptr) { if(parent != nullptr) {
window.setGeometry(parent->geometry()); window.setGeometry(parent->geometry());
} }
window._exec(FMMsgWnd::T_Failure, info); window._exec(FMMsgWnd::T_Failure, info, btn_ok_text);
} }
void FMMsgWnd::WarningWnd(const QString &info, QDialog *parent) void FMMsgWnd::WarningWnd(const QString &info, QDialog *parent, const QString &btn_ok_text)
{ {
FMMsgWnd window(parent); FMMsgWnd window(parent);
if(parent != nullptr) { if(parent != nullptr) {
window.setGeometry(parent->geometry()); window.setGeometry(parent->geometry());
} }
window._exec(FMMsgWnd::T_Warning, info); window._exec(FMMsgWnd::T_Warning, info, btn_ok_text);
} }
void FMMsgWnd::SuccessWnd(const QString &info, QDialog *parent) void FMMsgWnd::SuccessWnd(const QString &info, QDialog *parent, const QString &btn_ok_text)
{ {
FMMsgWnd window(parent); FMMsgWnd window(parent);
if(parent != nullptr) { if(parent != nullptr) {
window.setGeometry(parent->geometry()); window.setGeometry(parent->geometry());
} }
window._exec(FMMsgWnd::T_Success, info); window._exec(FMMsgWnd::T_Success, info, btn_ok_text);
} }
void FMMsgWnd::LoginSuccess(const QString &account, const QString &name, const QString &birthday, QDialog *parent) void FMMsgWnd::LoginSuccess(const QString &account, const QString &name, const QString &birthday, QDialog *parent)
...@@ -103,14 +108,14 @@ void FMMsgWnd::LoginSuccess(const QString &account, const QString &name, const Q ...@@ -103,14 +108,14 @@ void FMMsgWnd::LoginSuccess(const QString &account, const QString &name, const Q
window.setGeometry(parent->geometry()); window.setGeometry(parent->geometry());
} }
QString info = QString::fromLocal8Bit("账号:%1\n姓名:%2\n生日:%3").arg(account).arg(name).arg(birthday); QString info = QString::fromLocal8Bit("账号:%1\n姓名:%2\n生日:%3").arg(account).arg(name).arg(birthday);
window._exec(FMMsgWnd::T_LoginSuccess, info); window._exec(FMMsgWnd::T_LoginSuccess, info, QString::fromLocal8Bit( "确认"));
} }
int FMMsgWnd::Question(const QString &info, QDialog *parent) int FMMsgWnd::Question(const QString &info, QDialog *parent, const QString &btn_ok_text)
{ {
FMMsgWnd window(parent); FMMsgWnd window(parent);
if(parent != nullptr) { if(parent != nullptr) {
window.setGeometry(parent->geometry()); window.setGeometry(parent->geometry());
} }
return window._exec(FMMsgWnd::T_Question, info); return window._exec(FMMsgWnd::T_Question, info, btn_ok_text);
} }
...@@ -25,12 +25,12 @@ public: ...@@ -25,12 +25,12 @@ public:
T_Question T_Question
}; };
int _exec(InfoType type = T_Normal, const QString &info = ""); int _exec(InfoType type = T_Normal, const QString &info = "", const QString &btn_ok_text="");
static void FailureWnd(const QString &info, QDialog *parent=0); static void FailureWnd(const QString &info, QDialog *parent=0, const QString &btn_ok_text=QString::fromLocal8Bit("确认"));
static void WarningWnd(const QString &info, QDialog *parent=0); static void WarningWnd(const QString &info, QDialog *parent=0, const QString &btn_ok_text=QString::fromLocal8Bit("确认"));
static void SuccessWnd(const QString &info, QDialog *parent=0); static void SuccessWnd(const QString &info, QDialog *parent=0, const QString &btn_ok_text=QString::fromLocal8Bit("确认"));
static void LoginSuccess(const QString &account, const QString &name, const QString &birthday, QDialog *parent=0); static void LoginSuccess(const QString &account, const QString &name, const QString &birthday, QDialog *parent=0);
static int Question(const QString &info, QDialog *parent=0); static int Question(const QString &info, QDialog *parent=0, const QString &btn_ok_text=QString::fromLocal8Bit("确认"));
private: private:
Ui::FMMsgWnd *ui; Ui::FMMsgWnd *ui;
......
#include "fmviplist.h" #include "fmviplist.h"
#include "ui_fmviplist.h" #include "ui_fmviplist.h"
#include <QJsonArray>
#include <QStandardItemModel>
FMVipList::FMVipList(QDialog *parent) : FMVipList::FMVipList(QDialog *parent) :
FMVipWnd(parent), FMVipWnd(parent),
ui(new Ui::FMVipList) ui(new Ui::FMVipList)
...@@ -15,3 +18,146 @@ FMVipList::~FMVipList() ...@@ -15,3 +18,146 @@ FMVipList::~FMVipList()
{ {
delete ui; delete ui;
} }
int FMVipList::exec()
{
emit getList();
return FMVipWnd::exec();
}
bool FMVipList::initWnd(Session *session)
{
ui->store_label->setText(session->data("SI").toString());
ui->pos_label->setText(session->data("STATIONID").toString());
ui->operator_label->setText(session->data("OPERATORID").toString());
ui->bd_label->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd"));
ui->tableWidget->horizontalHeader()->setStretchLastSection(true);
ui->tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows); //单击选择一行
ui->tableWidget->setSelectionMode(QAbstractItemView::SingleSelection); //设置只能选择一行,不能多行选中
ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers); //设置每行内容不可更改
ui->tableWidget->setAlternatingRowColors(true);
return true;
}
void FMVipList::getListArray(QJsonArray &jsonArray)
{
int row = jsonArray.size();
qDebug() << row;
ui->tableWidget->clear();
ui->tableWidget->setRowCount(row);
ui->tableWidget->setColumnCount(5);
QStringList header;
header << QString::fromLocal8Bit("订单编号") << QString::fromLocal8Bit("订单积分") << QString::fromLocal8Bit("积分状态") <<
QString::fromLocal8Bit("优惠券数") << QString::fromLocal8Bit("订单时间");
ui->tableWidget->setHorizontalHeaderLabels(header);
ui->tableWidget->setColumnWidth(0,300);
ui->tableWidget->setColumnWidth(4,300);
QString status;
for(int i=0; i<row; i++)
{
QJsonObject listObj = jsonArray[i].toObject();
ui->tableWidget->setItem(i, 0, new QTableWidgetItem(QString(listObj["fmOrderID"].toString())));
ui->tableWidget->setItem(i, 1, new QTableWidgetItem(QString(listObj["points"].toString())));
if(QString(listObj["pointsStatus"].toString()) == "F") {
status = QString::fromLocal8Bit("失败");
}else if(QString(listObj["pointsStatus"].toString()) == "S") {
status = QString::fromLocal8Bit("成功");
}else {
status = QString::fromLocal8Bit("未知");
}
ui->tableWidget->setItem(i, 2, new QTableWidgetItem(status));
ui->tableWidget->setItem(i, 3, new QTableWidgetItem(QString(listObj["couponCode"].toString())));
ui->tableWidget->setItem(i, 4, new QTableWidgetItem(QString(listObj["createDate"].toString())));
}
}
void FMVipList::on_order_pushButton_clicked()
{
QString date = ui->dateEdit->text();
emit buttonClick();
}
void FMVipList::clickListArray(QJsonArray &jsonArray)
{
int row = jsonArray.size();
ui->tableWidget->clear();
QStringList header;
header << QString::fromLocal8Bit("订单编号") << QString::fromLocal8Bit("订单积分") << QString::fromLocal8Bit("积分状态") <<
QString::fromLocal8Bit("优惠券数") << QString::fromLocal8Bit("订单时间");
ui->tableWidget->setHorizontalHeaderLabels(header);
ui->tableWidget->setColumnWidth(0,300);
ui->tableWidget->setColumnWidth(4,300);
QJsonArray array;
for(int i =0; i< row;i++)
{
QJsonObject listObj = jsonArray[i].toObject();
QString date = QString(listObj["createDate"].toString());
QString time = date.split(" ").at(0);
QString order = ui->order_lineEdit->text();
if(time == ui->dateEdit->text())
{
if(order == NULL)
{
array.append(listObj);
}else {
if(order == QString(listObj["fmOrderID"].toString())) {
array.append(listObj);
}
}
}
}
QString status;
int newRow = array.size();
ui->tableWidget->setRowCount(newRow);
ui->tableWidget->setColumnCount(5);
for(int j=0; j<newRow; j++)
{
QJsonObject obj = array[j].toObject();
ui->tableWidget->setItem(j, 0, new QTableWidgetItem(QString(obj["fmOrderID"].toString())));
ui->tableWidget->setItem(j, 1, new QTableWidgetItem(QString(obj["points"].toString())));
if(QString(obj["pointsStatus"].toString()) == "F") {
status = QString::fromLocal8Bit("失败");
}else if(QString(obj["pointsStatus"].toString()) == "S") {
status = QString::fromLocal8Bit("成功");
}else {
status = QString::fromLocal8Bit("未知");
}
ui->tableWidget->setItem(j, 2, new QTableWidgetItem(status));
ui->tableWidget->setItem(j, 3, new QTableWidgetItem(QString(obj["couponCode"].toString())));
ui->tableWidget->setItem(j, 4, new QTableWidgetItem(QString(obj["createDate"].toString())));
}
}
//void FMVipList::getDoubleArray(QJsonArray &jsonArray)
//{
// qDebug() << "____________________________13_________";
//}
//void FMVipList::on_tableWidget_doubleClicked(const QModelIndex &index)
//{
// int row = index.row();
// QString id = ui->tableWidget->item(row,0)->text();
// qDebug() << "____________________________11_________";
// emit doubleClick(id);
//}
...@@ -15,6 +15,22 @@ public: ...@@ -15,6 +15,22 @@ public:
explicit FMVipList(QDialog *parent = 0); explicit FMVipList(QDialog *parent = 0);
~FMVipList(); ~FMVipList();
bool initWnd(Session *session);
void getListArray(QJsonArray &jsonArray);
void clickListArray(QJsonArray &jsonArray);
// void getDoubleArray(QJsonArray &jsonArray);
int exec();
signals:
void getList();
void buttonClick();
// void doubleClick(const QString &id);
private slots:
void on_order_pushButton_clicked();
// void on_tableWidget_doubleClicked(const QModelIndex &index);
private: private:
Ui::FMVipList *ui; Ui::FMVipList *ui;
}; };
......
...@@ -44,12 +44,14 @@ bool FMVipLogin::initWnd(Session *session) ...@@ -44,12 +44,14 @@ bool FMVipLogin::initWnd(Session *session)
ui->logo_label->setText(QString::fromLocal8Bit("华润通小助手")); ui->logo_label->setText(QString::fromLocal8Bit("华润通小助手"));
ui->bd_label->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd")); ui->bd_label->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd"));
ui->store_label->setText(session->data("SI").toString()); ui->store_label->setText(session->data("SI").toString());
ui->pos_desc_label->close(); // ui->pos_desc_label->close();
ui->pos_label->close(); // ui->pos_label->close();
ui->operator_desc_label->close(); // ui->operator_desc_label->close();
ui->operator_label->close(); // ui->operator_label->close();
ui->pos_label->setText(session->data("STATIONID").toString());
ui->operator_label->setText(session->data("OPERATORID").toString());
ui->login_edit->setPlaceholderText(placeText); ui->login_edit->setPlaceholderText(placeText);
ui->title->setStyleSheet("QWidget{background:rgb(255, 170, 0);border:1px}"); ui->title->setStyleSheet("QWidget{background:rgb(255, 170, 0);border:1px;color:black}");
ui->login_btn->setStyleSheet("QPushButton{background:rgb(255, 170, 0)}"); ui->login_btn->setStyleSheet("QPushButton{background:rgb(255, 170, 0)}");
#else #else
ui->store_label->setText(session->data(PosProps.StoreId).toString()); ui->store_label->setText(session->data(PosProps.StoreId).toString());
......
#include "fmviporder.h" #include "fmviporder.h"
#include "fmmsgwnd.h" #include "fmmsgwnd.h"
#include "taskothers.h"
#include "ui_fmviporder.h" #include "ui_fmviporder.h"
#include "itemdelegate.h" #include "itemdelegate.h"
#include "couponmodel.h" #include "couponmodel.h"
...@@ -31,45 +32,66 @@ FMVipOrder::FMVipOrder(QDialog *parent) : ...@@ -31,45 +32,66 @@ FMVipOrder::FMVipOrder(QDialog *parent) :
ui->undis_desc_label->close(); ui->undis_desc_label->close();
ui->undis_label->close(); ui->undis_label->close();
scanfLabel = new QLabel(ui->price); ui->balance_label->close();
scanfLabel->setText(QString::fromLocal8Bit("优惠券扫一扫:")); ui->balance_desc_label->close();
scanfLabel->adjustSize(); ui->name_label->close();
scanfLabel->move(150,20); ui->name_desc_label->close();
scanfLabel->show(); ui->id_label->close();
ui->id_desc_label->close();
ui->point_label->close();
ui->point_desc_label->close();
scanfLe = new QLineEdit(ui->price); scanfLabel = new QLabel(ui->profile);
scanfLabel->move(0,0);
scanfLabel->setMinimumSize(182,61);
scanfLabel->setText(QString::fromLocal8Bit("扫一扫"));
scanfLabel->setAlignment(Qt::AlignCenter);
scanfLabel->setStyleSheet("QLabel{background:white;border:1px solid silver;border-bottom:0px}");
scanfLe = new QLineEdit(ui->profile);
scanfLe->setMinimumSize(350,30); scanfLe->setMinimumSize(350,30);
scanfLe->move(300,21); scanfLe->move(250,16);
scanfLe->show(); scanfLe->setStyleSheet("QLineEdit{border:1px solid silver}");
storeLabel = new QLabel(ui->profile); vipLabel_desc = new QLabel(ui->price);
storeLabel->move(0,20); vipLabel_desc->move(0,0);
storeLabel->setMinimumWidth(786); vipLabel_desc->setMinimumSize(182,69);
storeLabel->setAlignment(Qt::AlignHCenter); vipLabel_desc->setText(QString::fromLocal8Bit("会员"));
vipLabel_desc->setAlignment(Qt::AlignCenter);
vipLabel_desc->setStyleSheet("QLabel{background:white;border:1px solid silver;border-top:0px}");
ui->profile->setStyleSheet("QWidget{border:1px solid silver}");
vipLe = new QLineEdit(ui->price);
vipLe->move(250,18);
vipLe->setMinimumSize(350,30);
vipLe->setEnabled(false);
ui->pay_edit->setFocus(); scanfLe->setFocus();
ui->pay_max->setText(QString::fromLocal8Bit("订单金额")); ui->pay_max->setText(QString::fromLocal8Bit("订单金额"));
ui->pay_max->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); ui->pay_max->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
ui->pay_max->setStyleSheet("QLabel{color:black;font:normal 18px;}");
needPayLe = new QLineEdit(ui->pay_widget);
ui->horizontalLayout_3->addWidget(needPayLe);
needPayLe->setAlignment(Qt::AlignCenter);
needPayLe->setMinimumHeight(45);
needPayLe->setStyleSheet("QLineEdit{font: 500 30px blod \"Microsoft YaHei\";color: rgb(50,50,50);}");
needPayLe->setEnabled(false);
ui->standard_label->setText(QString::fromLocal8Bit("实收金额"));
ui->standard_label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
ui->standard_label->setStyleSheet("QLabel{color:black;font:normal 18px;}");
ui->coupon_desc_label->setText(QString::fromLocal8Bit("优惠券")); ui->coupon_desc_label->setText(QString::fromLocal8Bit("优惠券"));
ui->pay_desc_label->setText(QString::fromLocal8Bit("金额")); ui->pay_desc_label->setText(QString::fromLocal8Bit("金额"));;
ui->logo_label->setText(QString::fromLocal8Bit("华润通小助手"));
ui->pay_btn->setText(QString::fromLocal8Bit("提交")); ui->pay_btn->setText(QString::fromLocal8Bit("提交"));
/*将profile界面中的label全部关闭,并插入新的门店信息*/
ui->balance_label->close();
ui->balance_desc_label->close();
ui->name_label->close();
ui->name_desc_label->close();
ui->id_label->close();
ui->id_desc_label->close();
ui->point_label->close();
ui->point_desc_label->close();
ui->title->setStyleSheet("QWidget{background:rgb(255, 170, 0);color:black}"); ui->title->setStyleSheet("QWidget{background:rgb(255, 170, 0);color:black}");
ui->pay_btn->setStyleSheet("QPushButton{background:rgb(255, 170, 0)}"); ui->pay_btn->setStyleSheet("QPushButton{background:rgb(255, 170, 0)}");
ui->coupon_page->setDisabled(true);
connect(scanfLe,SIGNAL(returnPressed()),this,SLOT(on_scanfLe_returnPressed())); connect(scanfLe,SIGNAL(returnPressed()),this,SLOT(on_scanfLe_returnPressed()));
#endif #endif
...@@ -87,13 +109,15 @@ FMVipOrder::~FMVipOrder() ...@@ -87,13 +109,15 @@ FMVipOrder::~FMVipOrder()
#ifdef FASTPAY #ifdef FASTPAY
delete scanfLabel; delete scanfLabel;
delete scanfLe; delete scanfLe;
delete vipLabel_desc;
delete vipLe;
delete needPayLe;
#endif #endif
} }
bool FMVipOrder::initWnd(Session *session) bool FMVipOrder::initWnd(Session *session)
{ {
this->_session = session; this->_session = session;
QString operator_id = session->data(PosProps.OperatorId).toString(); QString operator_id = session->data(PosProps.OperatorId).toString();
QString business_date = session->data(PosProps.BussinessDate).toString(); QString business_date = session->data(PosProps.BussinessDate).toString();
QString fm_id = session->data(PosProps.Fm_open_id).toString(); QString fm_id = session->data(PosProps.Fm_open_id).toString();
...@@ -129,8 +153,15 @@ bool FMVipOrder::initWnd(Session *session) ...@@ -129,8 +153,15 @@ bool FMVipOrder::initWnd(Session *session)
ui->name_label->setText(name); ui->name_label->setText(name);
#ifdef FASTPAY #ifdef FASTPAY
storeLabel->setText(session->data("PN").toString()); // storeLabel->setText(session->data("PN").toString());
storeLabel->adjustSize(); // storeLabel->adjustSize();
QString storeName = session->data("PN").toString();
QString logo = QString::fromLocal8Bit("华润通小助手") + "(" +storeName + ")";
ui->logo_label->setText(logo);
ui->store_label->setText(session->data("SI").toString());
ui->pos_label->setText(session->data("STATIONID").toString());
ui->operator_label->setText(session->data("OPERATORID").toString());
ui->bd_label->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd"));
#endif #endif
...@@ -141,6 +172,7 @@ bool FMVipOrder::initWnd(Session *session) ...@@ -141,6 +172,7 @@ bool FMVipOrder::initWnd(Session *session)
selectionModel = ui->coupon_page->selectionModel(); selectionModel = ui->coupon_page->selectionModel();
connect(selectionModel, &QItemSelectionModel::selectionChanged, this, &FMVipOrder::onSelectionChanged); connect(selectionModel, &QItemSelectionModel::selectionChanged, this, &FMVipOrder::onSelectionChanged);
insertVip();
initCouponItems(); initCouponItems();
oldPayText = DOUBLE_STR(orderInfo->getMaxWillPay()); oldPayText = DOUBLE_STR(orderInfo->getMaxWillPay());
...@@ -162,11 +194,43 @@ void FMVipOrder::on_pay_btn_clicked() ...@@ -162,11 +194,43 @@ void FMVipOrder::on_pay_btn_clicked()
int payAmount = codeAmount + (orderInfo->getPayAmountScore() + orderInfo->getPayAmountCoupon()) * 100; int payAmount = codeAmount + (orderInfo->getPayAmountScore() + orderInfo->getPayAmountCoupon()) * 100;
session()->addData(PosProps.Pay_amount, payAmount); session()->addData(PosProps.Pay_amount, payAmount);
#ifdef FASTPAY
if(vipLe->text() == NULL)
{
FMMsgWnd::FailureWnd(QString::fromLocal8Bit("会员为空!"),this);
this->setEnabled(true);
return;
}
QString amount = needPayLe->text();
// QStringList strlist = str.split(":");
// QString amount = strlist.at(1);
// if(amount.toDouble() == 0.0)
// {
// FMMsgWnd::SuccessWnd(QString::fromLocal8Bit(" 提交成功!"),this);
// reject();
// return;
// }
session()->addData(PosProps.TotalAmount,QString::number(codeAmount));
session()->addData(PosProps.PayTotalAmount,amount.toDouble()*100);
session()->addData(PosProps.CouponDiscount,orderInfo->getPayAmountCoupon() * 100);
if(amount.toDouble() < 0)
{
FMMsgWnd::FailureWnd(QString::fromLocal8Bit("请确认金额!"),this);
this->setEnabled(true);
return;
}
QJsonObject json;
TaskPoint pointTask(json,_session);
pointTask.doTask();
reject();
#else
this->setEnabled(false); this->setEnabled(false);
setIsBusy(true); setIsBusy(true);
emit pay(); emit pay();
#endif
} }
//! 点击元素时选中/取消选中代金券 //! 点击元素时选中/取消选中代金券
...@@ -204,6 +268,15 @@ void FMVipOrder::on_coupon_page_clicked(const QModelIndex &index) ...@@ -204,6 +268,15 @@ void FMVipOrder::on_coupon_page_clicked(const QModelIndex &index)
} }
} }
void FMVipOrder::insertVip()
{
qDebug() << _session->data("VIP").toInt();
if(_session->data("VIP").toInt())
{
vipLe->setText(session()->data(PosProps.Coupon_code).toString());
}
}
void FMVipOrder::initCouponItems() void FMVipOrder::initCouponItems()
{ {
...@@ -325,8 +398,14 @@ void FMVipOrder::setRealPay() ...@@ -325,8 +398,14 @@ void FMVipOrder::setRealPay()
QString orderPayStr = ui->pay_edit->text(); QString orderPayStr = ui->pay_edit->text();
double orderPay = orderPayStr.toDouble(); double orderPay = orderPayStr.toDouble();
double realPay = orderPay - orderInfo->getPayAmountCoupon(); double realPay = orderPay - orderInfo->getPayAmountCoupon();
ui->standard_label->setText(QString::fromLocal8Bit("实收金额:%1").arg(realPay)); qDebug() << realPay;
} if(realPay <= 0)
{
needPayLe->setText(QString::fromLocal8Bit("0.00"));
}else{
needPayLe->setText(QString::fromLocal8Bit("%1").arg(realPay));
}
}
#endif #endif
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <QListWidgetItem> #include <QListWidgetItem>
#include <QModelIndex> #include <QModelIndex>
#include <QLabel> #include <QLabel>
#include <QLineEdit>
#include <QVBoxLayout> #include <QVBoxLayout>
#include "fmvipwnd.h" #include "fmvipwnd.h"
#include "global.h" #include "global.h"
...@@ -29,6 +30,7 @@ public: ...@@ -29,6 +30,7 @@ public:
~FMVipOrder(); ~FMVipOrder();
bool initWnd(Session *session); bool initWnd(Session *session);
void insertVip();
void initCouponItems(); void initCouponItems();
void setWillPayText(); void setWillPayText();
...@@ -216,9 +218,10 @@ private: ...@@ -216,9 +218,10 @@ private:
#ifdef FASTPAY #ifdef FASTPAY
QLabel *scanfLabel; QLabel *scanfLabel;
QLabel *storeLabel; QLabel *vipLabel_desc;
QLabel *storeLabel_desc;
QLineEdit *scanfLe; QLineEdit *scanfLe;
QLineEdit *vipLe;
QLineEdit *needPayLe;
QJsonObject *_json; QJsonObject *_json;
#endif #endif
......
...@@ -142,9 +142,12 @@ ...@@ -142,9 +142,12 @@
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>10</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
...@@ -232,11 +235,11 @@ ...@@ -232,11 +235,11 @@
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType"> <property name="sizeType">
<enum>QSizePolicy::Expanding</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>13</width> <width>40</width>
<height>57</height> <height>57</height>
</size> </size>
</property> </property>
......
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QListView" name="listView"/> <widget class="QTableWidget" name="tableWidget"/>
</item> </item>
</layout> </layout>
</widget> </widget>
......
...@@ -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 38 #define VER_BUILD 41
//! 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