Commit 62d46658 by gujin.wang

添加查看核销详情的功能

parent 1cfe7b2d
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "fmp_settings_i.h" #include "fmp_settings_i.h"
#include "fmp_epay_i.h" #include "fmp_epay_i.h"
#include "fmp_home_i.h" #include "fmp_home_i.h"
#include "redeemdetail.h"
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonObject> #include <QJsonObject>
#include <QJsonParseError> #include <QJsonParseError>
...@@ -26,10 +27,11 @@ ...@@ -26,10 +27,11 @@
#include <QSqlQuery> #include <QSqlQuery>
#include <QSqlError> #include <QSqlError>
bool isRedeeming = false;
FMPRedeem::FMPRedeem(const FMPContext context) FMPRedeem::FMPRedeem(const FMPContext context)
:FMPRedeemInterface(), :FMPRedeemInterface(),
_context(context), _context(context),
_isRedeeming(false),
_inited(false), _inited(false),
_clientReqCount(0), _clientReqCount(0),
_ste_handler(new FMPStartEventHandler(this)) _ste_handler(new FMPStartEventHandler(this))
...@@ -63,7 +65,13 @@ void FMPRedeem::UninitService() ...@@ -63,7 +65,13 @@ void FMPRedeem::UninitService()
bool FMPRedeem::IsRedeeming()const bool FMPRedeem::IsRedeeming()const
{ {
return _isRedeeming; return isRedeeming;
}
void FMPRedeem::ShowRedeemDetail()
{
RedeemDetail dlg;
dlg.exec();
} }
QJsonValue FMPRedeem::SearchJsonObject(QJsonObject& searchJson, QString searchKey) QJsonValue FMPRedeem::SearchJsonObject(QJsonObject& searchJson, QString searchKey)
...@@ -126,7 +134,7 @@ QJsonObject FMPRedeem::Reverse(QJsonObject request) ...@@ -126,7 +134,7 @@ QJsonObject FMPRedeem::Reverse(QJsonObject request)
QJsonObject FMPRedeem::Redeem(const QJsonArray& productsInfo) QJsonObject FMPRedeem::Redeem(const QJsonArray& productsInfo)
{ {
_isRedeeming = true; isRedeeming = true;
FMP_DEBUG() << "Recv redeem data: " << QJsonDocument(productsInfo).toJson(QJsonDocument::Compact); FMP_DEBUG() << "Recv redeem data: " << QJsonDocument(productsInfo).toJson(QJsonDocument::Compact);
_products_info = productsInfo; _products_info = productsInfo;
//读取门店信息 //读取门店信息
...@@ -154,7 +162,7 @@ QJsonObject FMPRedeem::Redeem(const QJsonArray& productsInfo) ...@@ -154,7 +162,7 @@ QJsonObject FMPRedeem::Redeem(const QJsonArray& productsInfo)
ret["statusCode"] = FM_API_WINDOWCLOSE; ret["statusCode"] = FM_API_WINDOWCLOSE;
ret["msg"] = QString::fromLocal8Bit("窗口关闭"); ret["msg"] = QString::fromLocal8Bit("窗口关闭");
FMP_DEBUG() << QJsonDocument(ret).toJson(QJsonDocument::Compact); FMP_DEBUG() << QJsonDocument(ret).toJson(QJsonDocument::Compact);
_isRedeeming = false; isRedeeming = false;
return ret; return ret;
} }
} }
...@@ -167,7 +175,7 @@ QJsonObject FMPRedeem::Redeem(const QJsonArray& productsInfo) ...@@ -167,7 +175,7 @@ QJsonObject FMPRedeem::Redeem(const QJsonArray& productsInfo)
ret["statusCode"] = FM_API_WINDOWCLOSE; ret["statusCode"] = FM_API_WINDOWCLOSE;
ret["msg"] = QString::fromLocal8Bit("窗口关闭"); ret["msg"] = QString::fromLocal8Bit("窗口关闭");
FMP_DEBUG() << QJsonDocument(ret).toJson(QJsonDocument::Compact); FMP_DEBUG() << QJsonDocument(ret).toJson(QJsonDocument::Compact);
_isRedeeming = false; isRedeeming = false;
return ret; return ret;
} }
_coupon = scanningDialog.code; _coupon = scanningDialog.code;
...@@ -204,7 +212,7 @@ QJsonObject FMPRedeem::Redeem(const QJsonArray& productsInfo) ...@@ -204,7 +212,7 @@ QJsonObject FMPRedeem::Redeem(const QJsonArray& productsInfo)
retJson = ShowForErr(retJson); retJson = ShowForErr(retJson);
break; break;
} }
_isRedeeming = false; isRedeeming = false;
return retJson; return retJson;
} }
......
...@@ -33,6 +33,7 @@ public: ...@@ -33,6 +33,7 @@ public:
QJsonObject Reverse(QJsonObject request); QJsonObject Reverse(QJsonObject request);
QJsonObject GetRedeemJson()const; QJsonObject GetRedeemJson()const;
virtual bool IsRedeeming() const; virtual bool IsRedeeming() const;
virtual void ShowRedeemDetail();
protected: protected:
const FMPContext GetContext() const { return _context; } const FMPContext GetContext() const { return _context; }
...@@ -56,7 +57,6 @@ private: ...@@ -56,7 +57,6 @@ private:
void SaveRedeemResult(QString code, QString code_name, QString ebname, double amount); void SaveRedeemResult(QString code, QString code_name, QString ebname, double amount);
private: private:
bool _isRedeeming;
bool _inited; bool _inited;
QString _store_id; QString _store_id;
QString _station_id; QString _station_id;
......
...@@ -64,7 +64,9 @@ HEADERS += \ ...@@ -64,7 +64,9 @@ HEADERS += \
errcodedialog.h \ errcodedialog.h \
scanningdialog.h \ scanningdialog.h \
fmp_pe_handlers.h \ fmp_pe_handlers.h \
storedialog.h storedialog.h \
mysqltablemodel.h \
redeemdetail.h
SOURCES += \ SOURCES += \
fmp_redeem.cpp \ fmp_redeem.cpp \
...@@ -75,7 +77,9 @@ SOURCES += \ ...@@ -75,7 +77,9 @@ SOURCES += \
errcodedialog.cpp \ errcodedialog.cpp \
scanningdialog.cpp \ scanningdialog.cpp \
fmp_pe_handlers.cpp \ fmp_pe_handlers.cpp \
storedialog.cpp storedialog.cpp \
mysqltablemodel.cpp \
redeemdetail.cpp
FORMS += \ FORMS += \
consumokdialog.ui \ consumokdialog.ui \
...@@ -83,4 +87,5 @@ FORMS += \ ...@@ -83,4 +87,5 @@ FORMS += \
couponkeypad.ui \ couponkeypad.ui \
errcodedialog.ui \ errcodedialog.ui \
scanningdialog.ui \ scanningdialog.ui \
storedialog.ui storedialog.ui \
\ No newline at end of file redeemdetail.ui
\ No newline at end of file
...@@ -24,6 +24,7 @@ public: ...@@ -24,6 +24,7 @@ public:
virtual QJsonObject Reverse(QJsonObject request) = 0; //卡券冲正 virtual QJsonObject Reverse(QJsonObject request) = 0; //卡券冲正
virtual QJsonObject GetRedeemJson()const = 0; virtual QJsonObject GetRedeemJson()const = 0;
virtual bool IsRedeeming()const = 0; virtual bool IsRedeeming()const = 0;
virtual void ShowRedeemDetail() = 0;
signals: signals:
void TriggerInit(); void TriggerInit();
......
#include "mysqltablemodel.h"
MySqlTableModel::MySqlTableModel(QObject *parent, QSqlDatabase db)
:QSqlTableModel(parent, db)
{
}
QVariant MySqlTableModel::data(const QModelIndex &idx, int role) const
{
QVariant value = QSqlTableModel::data(idx, role);
if(role == Qt::TextAlignmentRole)
return Qt::AlignCenter;
return value;
}
\ No newline at end of file
#ifndef MYSQLTABLEMODEL_H
#define MYSQLTABLEMODEL_H
#include <QSqlTableModel>
class MySqlTableModel : public QSqlTableModel
{
public:
MySqlTableModel(QObject * parent = 0, QSqlDatabase db = QSqlDatabase());
QVariant data(const QModelIndex &idx, int role) const;
};
#endif // MYSQLTABLEMODEL_H
#include "redeemdetail.h"
#include "ui_redeemdetail.h"
#include "fmp_logger_i.h"
#include <QMouseEvent>
#include <QTableWidgetItem>
#include <QMessageBox>
#include <QDebug>
#include <QSqlResult>
#include <QApplication>
extern bool isRedeeming;
RedeemDetail::RedeemDetail(QWidget *parent) :
QDialog(parent),
ui(new Ui::RedeemDetail)
{
ui->setupUi(this);
setAttribute(Qt::WA_QuitOnClose, false);
setWindowFlags(windowFlags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
connect(ui->closeBtn, SIGNAL(clicked(bool)), this, SLOT(close()));
ui->tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
connect(ui->findBtn, SIGNAL(clicked(bool)), this, SLOT(FindByCode()));
connect(ui->codeEdit, SIGNAL(textChanged(QString)), this, SLOT(FindByCode(QString)));
connect(ui->refundBtn, SIGNAL(clicked(bool)), this, SLOT(RefundByCode()));
connect(ui->keyBtn, SIGNAL(clicked(bool)), this, SLOT(ShowKeyboard(bool)));
connect(ui->preBtn, SIGNAL(clicked(bool)), this, SLOT(PrevDay()));
connect(ui->nextBtn, SIGNAL(clicked(bool)), this, SLOT(NextDay()));
connect(ui->oneBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->twoBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->threeBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->fourBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->fiveBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->sixBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->sevenBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->eightBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->nineBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->zeroBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
connect(ui->delBtn, SIGNAL(clicked(bool)), this, SLOT(keyboardPressed()));
ui->numWidget->hide();
ui->refundBtn->hide();
InitSqlite();
LoadRedeemRecord();
isRedeeming = true;
}
RedeemDetail::~RedeemDetail()
{
isRedeeming = false;
db.close();
delete ui;
}
void RedeemDetail::mousePressEvent(QMouseEvent *e)
{
mouse_pressed = true;
movePosition = e->globalPos() - pos();
return QDialog::mousePressEvent(e);
}
void RedeemDetail::mouseMoveEvent(QMouseEvent *e)
{
if(mouse_pressed && (e->buttons() & Qt::LeftButton) && (e->globalPos()-movePosition).manhattanLength() > QApplication::startDragDistance())
{
move(e->globalPos() - movePosition);
movePosition = e->globalPos() - pos();
}
return QDialog::mouseMoveEvent(e);
}
void RedeemDetail::mouseReleaseEvent(QMouseEvent *e)
{
mouse_pressed = false;
return QDialog::mouseReleaseEvent(e);
}
void RedeemDetail::keyPressEvent(QKeyEvent *e)
{
switch(e->key())
{
case Qt::Key_Return:
case Qt::Key_Enter:
return;
default:
break;
}
QDialog::keyPressEvent(e);
}
void RedeemDetail::FindByCode()
{
QString code = ui->codeEdit->text().trimmed();
if(code.isEmpty())
return;
model->setFilter("code="+code);
}
void RedeemDetail::FindByCode(QString str)
{
model->setFilter("code like '%"+str+"%'");
}
void RedeemDetail::RefundByCode()
{
QModelIndex idx = ui->tableView->currentIndex();
if(!idx.isValid())
return;
QString code = model->data(model->index(idx.row(), 0), Qt::EditRole).toString();
QMessageBox::information(this, QString::fromLocal8Bit("测试"), QString::fromLocal8Bit("退款成功!券码:")+code);
}
void RedeemDetail::ShowKeyboard(bool checked)
{
if(checked)
ui->numWidget->show();
else
ui->numWidget->hide();
}
bool RedeemDetail::InitSqlite()
{
db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName(QApplication::applicationDirPath() + "\\redeem.db");
if(!db.open())
{
FMP_DEBUG() << "open redeem.db failed: " << db.lastError().driverText();
return false;
}
QSqlQuery query(db);
QString sql = "create table if not exists redeem(code varchar(20), code_name varchar(20), ebname varchar(20), amount double, redeem_date datetime default CURRENT_TIMESTAMP)";
if(!query.exec(sql))
{
FMP_DEBUG() << "create redeem table failed: " << query.lastError().databaseText();
db.close();
return false;
}
return true;
}
void RedeemDetail::ComputeCurrentData()
{
QSqlQuery query;
QString sql = QString("select count(*) from redeem where date(redeem_date)=date('%1')").arg(curDate.toString("yyyy-MM-dd"));
if(!query.exec(sql))
{
FMP_DEBUG() << "select redeem record failed: " << query.lastError().driverText();
db.close();
return;
}
query.next();
ui->totalRedeem->setText(QString::number(query.value(0).toInt()));
sql = QString("select sum(amount) from redeem where date(redeem_date)=date('%1')").arg(curDate.toString("yyyy-MM-dd"));
if(!query.exec(sql))
{
FMP_DEBUG() << "select redeem record failed: " << query.lastError().driverText();
db.close();
return;
}
query.next();
ui->totalRedeemMoney->setText(QString::number(query.value(0).toDouble()));
}
void RedeemDetail::LoadRedeemRecord()
{
curDate = QDate::currentDate();
QSqlQuery query(db);
//删除90天之前的数据
QString sql = "delete from redeem where julianday('now')-julianday(redeem_date)>90";
if(!query.exec(sql))
{
FMP_DEBUG() << "delete from redeem failed: " << query.lastError().databaseText();
}
//查询出当前数据库中的最小日期
sql = "select min(redeem_date) from redeem";
if(!query.exec(sql))
{
FMP_DEBUG() << query.lastError().databaseText();
}
else
{
query.next();
minDate = query.value(0).toDate();
minDate = minDate.isValid() ? minDate : QDate::currentDate();
}
ComputeCurrentData();
model = new MySqlTableModel(this, db);
model->setTable("redeem");
model->setFilter("date(redeem_date) = date('now')");
model->select();
model->setHeaderData(0, Qt::Horizontal, QString::fromLocal8Bit("券码"));
model->setHeaderData(1, Qt::Horizontal, QString::fromLocal8Bit("名称"));
model->setHeaderData(2, Qt::Horizontal, QString::fromLocal8Bit("渠道"));
model->setHeaderData(3, Qt::Horizontal, QString::fromLocal8Bit("金额"));
model->setHeaderData(4, Qt::Horizontal, QString::fromLocal8Bit("核销时间"));
ui->tableView->setModel(model);
}
void RedeemDetail::PrevDay()
{
QDate d(curDate.year(), curDate.month(), curDate.day()-1);
if(d < minDate)
return;
model->setFilter("date(redeem_date)=date('" + d.toString("yyyy-MM-dd") + "')");
curDate = d;
ComputeCurrentData();
}
void RedeemDetail::NextDay()
{
if(curDate == QDate::currentDate())
return;
QDate d(curDate.year(), curDate.month(), curDate.day()+1);
model->setFilter("date(redeem_date)=date('" + d.toString("yyyy-MM-dd") + "')");
curDate = d;
ComputeCurrentData();
}
void RedeemDetail::keyboardPressed()
{
QPushButton* btn = qobject_cast<QPushButton*>(sender());
if(!btn)
return;
if(btn == ui->delBtn)
{
QString txt = ui->codeEdit->text();
if(txt.isEmpty())
return;
txt.remove(txt.length()-1, 1);
ui->codeEdit->setText(txt);
}
else
{
QString txt = ui->codeEdit->text();
txt.append(btn->text());
ui->codeEdit->setText(txt);
}
}
#ifndef DIALOG_H
#define DIALOG_H
#include <QDialog>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QDate>
#include "mysqltablemodel.h"
namespace Ui {
class RedeemDetail;
}
class RedeemDetail : public QDialog
{
Q_OBJECT
public:
explicit RedeemDetail(QWidget *parent = 0);
~RedeemDetail();
protected:
void mousePressEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
void keyPressEvent(QKeyEvent* e);
private slots:
void FindByCode();
void FindByCode(QString str);
void RefundByCode();
void ShowKeyboard(bool checked);
bool InitSqlite();
void ComputeCurrentData();
void LoadRedeemRecord();
void PrevDay();
void NextDay();
void keyboardPressed();
private:
Ui::RedeemDetail *ui;
bool mouse_pressed;
QPoint movePosition;
QSqlDatabase db;
MySqlTableModel* model;
QDate curDate;
QDate minDate;
};
#endif // DIALOG_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RedeemDetail</class>
<widget class="QDialog" name="RedeemDetail">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>750</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>700</width>
<height>700</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>700</width>
<height>750</height>
</size>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<property name="styleSheet">
<string notr="true">#RedeemDetail{
background-color:white;
}
#titleLabel{
background: rgb(56, 56, 64);
color:rgb(255, 255, 255);
font: normal 16px &quot;Microsoft YaHei&quot;;
}
#closeBtn{
background: rgb(56, 56, 64);
background-image:url(:/img/close_02.png);
background-repeat:no-repeat;
background-position:center;
border:none;
}
#closeBtn:pressed{
padding: 1 0 0 2;
}
#totalLabel{
background: lightgrey;
color:rgb(0, 0, 0);
font: normal 16px &quot;Microsoft YaHei&quot;;
}
QHeaderView::section{
background: lightgrey;
color:rgb(0, 0, 0);
border:none;
min-height:40px;
}
#totalRedeem{
font-size:30px;
font-weight:bold;
}
#totalRedeemMoney{
font-size:30px;
font-weight:bold;
}
#orderNum{
font-size:30px;
font-weight:bold;
}
#orderTotalMoney{
font-size:30px;
font-weight:bold;
}
#deductionMoney{
font-size:30px;
font-weight:bold;
}
#actualMoney{
font-size:30px;
font-weight:bold;
}
#codeLabel{
font: normal 16px &quot;Microsoft YaHei&quot;;
}
#findBtn, #refundBtn, #preBtn, #nextBtn, #keyBtn{
background-color:lightgrey;
font: normal 16px &quot;MicroSoft YaHei&quot;;
border-radius:15px;
}
#findBtn:pressed, #refundBtn:pressed, #preBtn:pressed, #nextBtn:pressed{
padding: 1 0 0 2;
}
#oneBtn, #twoBtn, #threeBtn, #fourBtn, #fiveBtn, #sixBtn, #sevenBtn, #eightBtn, #nineBtn, #zeroBtn, #delBtn{
background-color:lightgrey;
font: normal 16px &quot;MicroSoft YaHei&quot;;
border-radius:20px;
}
#delBtn{
background-image:url(:/img/dlt.png);
background-repeat:no-repeat;
background-position:center;
}
#delBtn:pressed{
background-image:url(:/img/dlt_onclick.png);
background-repeat:no-repeat;
background-position:center;
}
#oneBtn:pressed, #twoBtn:pressed, #threeBtn:pressed, #fourBtn:pressed, #fiveBtn:pressed, #sixBtn:pressed, #sevenBtn:pressed, #eightBtn:pressed, #nineBtn:pressed, #zeroBtn:pressed{
padding:1 0 0 2
}</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="spacing">
<number>0</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="widget_4" native="true">
<property name="minimumSize">
<size>
<width>700</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>700</width>
<height>40</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="titleLabel">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>660</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>当日核销详情</string>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="indent">
<number>10</number>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="closeBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<property name="minimumSize">
<size>
<width>700</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>700</width>
<height>200</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="totalLabel">
<property name="minimumSize">
<size>
<width>700</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>总核销</string>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="indent">
<number>10</number>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="totalOrdersLabel">
<property name="minimumSize">
<size>
<width>351</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>总核销数</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="indent">
<number>10</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="totalRedeem">
<property name="minimumSize">
<size>
<width>351</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>256</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="totalMoneyLabel">
<property name="minimumSize">
<size>
<width>330</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>总核销额</string>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="indent">
<number>10</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="totalRedeemMoney">
<property name="minimumSize">
<size>
<width>330</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>256.00</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="margin">
<number>0</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QTableView" name="tableView">
<property name="minimumSize">
<size>
<width>700</width>
<height>300</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>700</width>
<height>400</height>
</size>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item>
<widget class="QWidget" name="widget_3" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>50</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="codeLabel">
<property name="minimumSize">
<size>
<width>101</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>输入券码查询</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="codeEdit">
<property name="minimumSize">
<size>
<width>170</width>
<height>30</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="keyBtn">
<property name="minimumSize">
<size>
<width>75</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>键盘</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="refundBtn">
<property name="minimumSize">
<size>
<width>75</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>退款</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="findBtn">
<property name="minimumSize">
<size>
<width>75</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>查询</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="preBtn">
<property name="minimumSize">
<size>
<width>75</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>前一天</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="nextBtn">
<property name="minimumSize">
<size>
<width>75</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>后一天</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="numWidget" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>45</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="oneBtn">
<property name="minimumSize">
<size>
<width>30</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>1</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="twoBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>2</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="threeBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>3</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fourBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>4</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="fiveBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>5</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="sixBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>6</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="sevenBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>7</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="eightBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>8</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="nineBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>9</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="zeroBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="delBtn">
<property name="minimumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>
...@@ -10,11 +10,14 @@ ...@@ -10,11 +10,14 @@
<file>img/btn_canel.png</file> <file>img/btn_canel.png</file>
<file>img/btn_consumption.png</file> <file>img/btn_consumption.png</file>
<file>img/btn_consumption_invalid.png</file> <file>img/btn_consumption_invalid.png</file>
<file>img/btn_manual.png</file> <file>img/btn_manual.png</file>
<file>img/close.png</file> <file>img/close.png</file>
<file>img/consumption_ok.png</file> <file>img/consumption_ok.png</file>
<file>img/folat_be_invalid.png</file> <file>img/folat_be_invalid.png</file>
<file>img/ma_bg.png</file> <file>img/ma_bg.png</file>
<file>img/scanning_bar.png</file> <file>img/scanning_bar.png</file>
<file>img/close_02.png</file>
<file>img/dlt.png</file>
<file>img/dlt_onclick.png</file>
</qresource> </qresource>
</RCC> </RCC>
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