Commit 06c80830 by jackalone

添加了简单的加料功能,销售单的功能

parent 2d5b181c
......@@ -34,8 +34,10 @@ void BaseObject::FetchDataFromJson(const QJsonObject &json)
QStringList keys = json.keys();
foreach(QString key, keys)
{
qDebug()<<"key.toUtf8()"<<key.toUtf8();
qDebug()<<"json[key].toVariant()"<<json[key].toVariant();
setProperty(key.toUtf8(), json[key].toVariant());
}
return;
}
......@@ -21,6 +21,27 @@ public:
* 返回:NULL
* */
void FetchDataFromJson(const QJsonObject& json);
// QJsonObject toJson() const
// {
// QJsonObject json;
// return json;
// }
QJsonObject toJson() const
{
QJsonObject json;
const QMetaObject *m = metaObject();
for( int i = m->propertyOffset(); i < m->propertyCount(); i ++)
{
QMetaProperty qmp = m->property(i);
QString key = QString::fromLatin1(qmp.name());
QVariant va = property( qmp.name());
QJsonValue jsonv = QJsonValue::fromVariant( va);
json.insert( key, jsonv);
}
return json;
}
};
#endif // BASEOBJECT_H
......@@ -8,13 +8,21 @@ class OrderObject : public BaseObject
Q_OBJECT
public:
OrderObject(QObject *parent=0)
:BaseObject(parent){}
:BaseObject(parent),
has_mate(false),
mate_assigned(false)
{}
/* 功能:从Json对象初获取数据
* 参数:[1]JSon对象
* 返回:NULL
* */
void FromJson(const QJsonObject& json);
void getProList(QList<ProductObject *> &list);
void setMateList(QList<ProductObject *> &list);
void CheckIfMatesAssigned();
void MatchObjectsFromBill(const QJsonObject &products);
QList<ProductObject *> _ReadObjectMates(const QString &mates_str);
public:
Q_PROPERTY (QString channel READ getChannel WRITE setChannel)
......@@ -49,7 +57,7 @@ public:
Q_PROPERTY (QString courier_name READ getcourier_name WRITE setcourier_name)
Q_PROPERTY (QString courier_phone READ getcourier_phone WRITE setcourier_phone)
Q_PROPERTY (QString status_desc READ getstatus_desc WRITE setstatus_desc)
Q_PROPERTY (QString delivery_time READ getdelivery_time WRITE setdelivery_time)
Q_PROPERTY (int delivery_time READ getdelivery_time WRITE setdelivery_time)
Q_PROPERTY (int delivery_status READ getdelivery_status WRITE setdelivery_status)
Q_PROPERTY (QString fm_id READ getfm_id WRITE setfm_id)
Q_PROPERTY (QStringList records READ getrecords WRITE setrecords)
......@@ -57,6 +65,11 @@ public:
Q_PROPERTY (int dis_platform_fee READ getdis_platform_fee WRITE setdis_platform_fee)
Q_PROPERTY (int dis_shop_fee READ getdis_shop_fee WRITE setdis_shop_fee)
Q_PROPERTY (int package_fee READ getpackage_fee WRITE setpackage_fee)
Q_PROPERTY (bool has_mate READ getHasMate WRITE setHasMate)
Q_PROPERTY (bool mate_assigned READ getMateAssigned WRITE setMateAssigned)
Q_PROPERTY (QString bill_file READ getBillFile WRITE setBillFile)
Q_PROPERTY (bool billed READ getBilled WRITE setBilled)
Q_PROPERTY (QString pay_id READ getpay_id WRITE setpay_id)
int service_fee; //平台佣金
int dis_platform_fee; //平台承担的优惠金额
......@@ -74,7 +87,7 @@ public:
int create_time; //订单时间
int delivery_type; //自配送/平台配送
QString delivery_party; //派送方式
QString delivery_time; //期望送达时间
int delivery_time; //期望送达时间
int delivery_status; //配送状态
int discount_fee; //商品优惠
int expire_time; //订单倒计时
......@@ -100,6 +113,9 @@ public:
int total_amount; //总件数
int user_fee; //应付金额
QStringList records; //订单操作记录
QString bill_file;
QString pay_id; //平台支付方式
protected:
int getservice_fee() const ;
......@@ -174,14 +190,38 @@ protected:
void setcourier_phone(const QString& v);
QString getstatus_desc() const;
void setstatus_desc(const QString& v);
QString getdelivery_time() const;
void setdelivery_time(const QString& v);
int getdelivery_time() const;
void setdelivery_time(const int& v);
QString getfm_id() const;
void setfm_id(const QString& v);
int getdelivery_status() const ;
void setdelivery_status(const int& v);
QStringList getrecords() const;
void setrecords(const QStringList& v);
bool getMateAssigned() const;
void setMateAssigned(bool v);
bool getHasMate() const;
void setHasMate(bool v);
QString getBillFile() const;
void setBillFile(const QString &v);
bool getBilled() const;
void setBilled(bool v);
void setpay_id(const QString& v);
QString getpay_id() const;
public:
// QList<ProductObject *> proList;
QList<ProductObject *> mateList; //所有的加料
QList<ProductObject *> assignedMateList; //已经分配的加料
QList<ProductObject *> loneMateList; //多余的加料(无法再分配)
QMap<int, QList<ProductObject*> > bpmap; //<口袋, 商品列表> Map
QMap<ProductObject*, QList<ProductObject*> > pvm; //<产品, 加料列表> Map
bool has_mate; // 已经加料的产品
bool mate_assigned; //加料的产品被加载
bool billed;
};
#endif // ORDEROBJECT_H
......@@ -54,3 +54,34 @@ void ProductObject::setProductAmount(const int &v)
{
productAmount = v;
}
QString ProductObject::getPropertyTags() const
{
return property_tags;
}
void ProductObject::setPropertyTags(const QString &v)
{
property_tags = v;
}
QString ProductObject::getSpecName() const
{
return spec_name;
}
void ProductObject::setSpecName(const QString &v)
{
spec_name = v;
}
QString ProductObject::getBagId() const
{
return bag_id;
}
void ProductObject::setBagId(const QString &v)
{
bag_id = v;
bag = bag_id.toInt();
}
......@@ -8,7 +8,8 @@ class ProductObject : public BaseObject
Q_OBJECT
public:
ProductObject(QObject *parent=0)
:BaseObject(parent){}
:BaseObject(parent),bag(0)
{}
Q_PROPERTY (QString pid READ getPid WRITE setPid)
Q_PROPERTY (QString name READ getName WRITE setName)
......@@ -16,13 +17,19 @@ public:
Q_PROPERTY (QString bsknum READ getbsknum WRITE setbsknum)
Q_PROPERTY (int price READ getprice WRITE setprice)
Q_PROPERTY (int productAmount READ getProductAmount WRITE setProductAmount)
Q_PROPERTY (QString property_tags READ getPropertyTags WRITE setPropertyTags)
Q_PROPERTY (QString spec_name READ getSpecName WRITE setSpecName)
QString pid;
QString name;
QString pid; //商品编码
QString name; //名字
QString upc;
QString bsknum; //所属菜篮子的编号
QString bsknum; //所属菜篮子的编号
int price;
int productAmount;
int productAmount; //商品数量
QString property_tags; //冷 热 等
QString spec_name; //新菜单 加料 规格 大杯小杯
int bag; // 口袋编码
QString bag_id; //字符串ID
protected:
......@@ -44,6 +51,15 @@ protected:
int getProductAmount() const ;
void setProductAmount(const int &v);
QString getBagId() const;
void setBagId(const QString &v);
QString getPropertyTags() const;
void setPropertyTags(const QString & v);
QString getSpecName() const;
void setSpecName(const QString &v);
};
#endif // PRODUCTOBJECT_H
......@@ -23,14 +23,28 @@ public:
bool _PullOrder(); //拉取订单
QString _GetJsonStr(const QJsonObject &json); //获得json数据
QString _Getstrtochar(char m_char[]);
void _netData(QJsonObject &sendJson);//网络数据发送
QStringList GetSearchResult(const QString &orderNum);//根据订单号搜索订单
QByteArray _GetOrderEntryData(const OrderObject *orderObject, bool bVerify=false); //对应的销售单的信息
QByteArray _GetRefundOrderData(const QString &orderId);//拒单操作
QString getHostMacAddress();
bool GetCashObject(QList<CashierObject>& cashiersList);
void WriteData(QString strdata);
bool ReadData(QString strdata);
void saveSqlite(OrderObject* orderObject);
bool OpenSqlite();
bool SelectOrderId(OrderObject* orderObject);
bool CreateTable(const QString &path);
void DeleteQuery();
void UseSQLite();
void Balance();
void GetChannelName(OrderObject* orderObject);
QVector<QString> strArray;
QString _Penny2Dollar(int penny);
int _GetTableVID(OrderObject *orderObject);
OrderObject* GetOrderObjByOrderId(const QString& orderId); //获取订单ID
bool WriteBill(const QString &oid);//写销售单
bool WriteBill(OrderObject *order);
void Total_Num();
void SelectTime();
bool DoSalesSlip(const OrderObject *orderObject, bool bVerify);//写销售单
QByteArray _GetOrderEntryData(const OrderObject *orderObject, bool bVerify);//拼接json数据
//自定义网络
HttpSocket *m_loginSocket;
......@@ -38,6 +52,7 @@ public:
HttpSocket *m_procOrderSocket;
HttpSocket *m_syncStockSocket;
QTimer *m_time;
QString error;
int m_syncTime;
private:
......@@ -47,19 +62,28 @@ private:
QString m_posId;
QString m_cashierId;
QString m_cashiername;
QString m_storeName;
bool m_print;
QDateTime m_bDate;
QString m_timestamp;// 拉取订单的时间戳
QMap<QString, OrderObject*> m_ordersMap; // 订单容器
// 当前收银员
CashierObject m_cashierObject;
bool m_follow;
QSqlDatabase database;
int total_num;
int user_num;
int discount_num;
int m_var_;
QString m_first_time;
QString m_last_time;
signals:
void showAlert(alertForm::Type type, const QString& msg);//显示通知窗口
void hideAlert(); //隐藏通知窗口
void setStoreInfo(const QString& storeId);//设置主界面门店信息
void setOpeStatus(const QString& status);//设置门店营业状态
void setNetStatus(const QString& status);//功能:设置门店网络状态
void changeOrderStatus(OrderObject* orderObject, int oldStatus=-100);//更改订单显示列表
void changeOrderStatus(OrderObject* orderObject,int oldStatus=-100);//更改订单显示列表
void showDeliverChooseForm(const QString& orderId, const QList<DeliverObject>& delivers);//显示配送员选择窗
void showCashierChooseForm(const QList<CashierObject>& cashiers);// 显示收银员选择窗
void showOrderDetails(OrderObject* orderObject);//获取订单详情信号
......@@ -67,7 +91,9 @@ signals:
void updateCashier(QString str);
void sgnThreadFollow();
void sgnKillThread();
void sgnNewIdPrint(OrderObject* orderObject); //新订单来了打印
void sgnNewIdPrint(OrderObject* orderObject,int var); //新订单来了打印
void sgnBalance(QString str,QString parameter);// 结算当天的各个渠道的总金额
public slots:
void onStartFlow(); //线程的初始化工作
......
......@@ -4,7 +4,11 @@
#include "global/preDefine.h"
#include "fmp_takeout_def.h"
#include <fmp_printer_i.h>
#include "QsLog/QsLog.h"
#include <QJsonParseError>
#include <QJsonObject>
using namespace QsLogging;
ConfigManger &ConfigManger::GetInstance()
{
static ConfigManger cm;
......@@ -18,6 +22,9 @@ ConfigManger::ConfigManger()
QString userConfig = QString("%1/%2").arg(appDir).arg(CONFIG_NAME);
QString testconfig = QString("%1/%2").arg(appDir).arg(TEST_NAME);
QString autoconfirm= QString("%1/%2").arg(appDir).arg(CONFIG_NAME);
QString mates = QString("%1/%2").arg(appDir).arg(CONFIG_NAME);
QString bill = QString("%1/%2").arg(appDir).arg(CONFIG_NAME);
QString slip=QString("%1/%2").arg(appDir).arg(CONFIG_NAME);
qDebug()<<"appDir is"<<appDir;
qDebug()<<"userconfig is"<<userConfig;
qDebug()<<"config is"<<config;
......@@ -25,6 +32,9 @@ ConfigManger::ConfigManger()
m_userConfig = new QSettings(userConfig, QSettings::IniFormat);
m_test = new QSettings(testconfig,QSettings::IniFormat);
m_Autoconfirm = new QSettings(autoconfirm,QSettings::IniFormat);
m_Mates = new QSettings(mates,QSettings::IniFormat);
m_Bill = new QSettings(bill,QSettings::IniFormat);
m_Slip = new QSettings(slip,QSettings::IniFormat);
}
ConfigManger::SqlConnectInfo ConfigManger::GetSqlConnectInfo()
......@@ -102,4 +112,83 @@ int ConfigManger::GetTcpServerPort()
return m_config->value(INI_NETWORKING, 93953).toInt();
}
QString ConfigManger::GetBillFile() const
{
QString order_file = m_Bill->value(FMP_INIPATH_WRITE_BILL).toString();
order_file = qApp->applicationDirPath() + "/" + order_file;
return order_file;
}
QString ConfigManger::GetViviBillFile() const
{
QString vivi_file = m_Bill->value(FMP_INIPATH_WRITE_BILL_PATH).toString();
vivi_file = qApp->applicationDirPath() + "/" + vivi_file + "/";
return vivi_file;
}
QStringList ConfigManger::GetStoreMates()
{
QStringList mates;
qDebug()<<"fms is GetStoreMates";
QJsonObject store_mates = _GetFileJson(m_Mates->value(FMP_INIPATH_COMMFILE_MATES).toString());
if (store_mates.contains("mates")) {
QString mates_str = store_mates["mates"].toString();
mates = mates_str.split(",");
QLOG_INFO() << "mates: " << mates;
}
else {
QLOG_INFO() << "failed reading mates";
}
return mates;
}
QJsonObject ConfigManger::_GetFileJson(const QString &file_path)
{
QString path=qApp->applicationDirPath().append("/").append(file_path);
qDebug()<<"path is"<<path;
QFile file(path);
QJsonObject obj;
if (file.exists() && file.open(QFile::ReadOnly))
{
QLOG_INFO() << file_path << " read ok.";
QByteArray content = file.readAll();
QJsonParseError jsonError;
QJsonDocument document = QJsonDocument::fromJson(content, &jsonError);
if(jsonError.error != QJsonParseError::NoError) //if error occured, see link 2
{
QLOG_WARN() << file_path << " parsed failed.";
}
else
{
QLOG_INFO() << file_path << " parsed ok.";
if(document.isObject())
{
obj = document.object();
return obj;
}
else
{
return obj;
}
}
file.close();
}
else
{
QLOG_WARN() << file_path << " read failed.";
return obj;
}
}
int ConfigManger::GetSlipPort()
{
return m_config->value(FMP_INIKEY_TAKEOUT_PORT, 55555).toInt();
}
QString ConfigManger::GetSlipIp()
{
return m_config->value(FMP_INIKEY_TAKEOUT_IP, "127.0.0.1").toString();
}
......@@ -84,6 +84,12 @@ public:
*/
int GetTcpServerPort();
QString GetAutoConfirm();
QStringList GetStoreMates();
QJsonObject _GetFileJson(const QString &file_path);
QString GetBillFile() const;
QString GetViviBillFile() const;
int GetSlipPort();
QString GetSlipIp();
private:
ConfigManger();
......@@ -96,6 +102,9 @@ private:
QSettings *m_userConfig;
QSettings *m_test;
QSettings *m_Autoconfirm;
QSettings *m_Mates;
QSettings *m_Bill;
QSettings *m_Slip;
};
......
......@@ -12,34 +12,22 @@ public:
public:
QString GB2312ToUnicode(char *src);
QString validCode();
void startInit();
void InitLogger(); //初始化日志
void flowinit();//初始化接单线程
bool LoadDll();//加载所有的dll
void inItGloal();//加载全局应用
void initnetData();//初始化网络数据
void initTheme(const QString& theme);//加载皮肤
void sleep(int ms);
void InitDialog();
QString getdata();
void GetprogramConfig();
//int StoreWay(); //返回门店的配置
//QString SaleSlip(); //返回门店的销售单配置
//销售单的IP及其port
//void GetSalesLipIpPort(QString &ip,int &port);
QString strpath;
bool GetStoreInfo(QString &m_storeid,QString &m_posid,QString &m_passd,QString &m_cashid);
void GetCathInfo(QString &m_cashname,QString &m_shiftid,QString &m_shiftname);
private:
void setTexcode();
void myMessageOutput();
void Initinterface();
public:
Q_SIGNAL void sgnHome(QString path);
Q_SIGNAL void sgnStopRemind(int type);
Q_SIGNAL void sgnMainUi();
Q_SIGNAL void sgnPrintdate(QString data);
Q_SIGNAL void sgnPrintdate(QString data,QString label);
Q_SIGNAL void sgnPrintName2();
Q_SIGNAL void sgnSendPrintName(QString str);
Q_SIGNAL void sgnReceStatus(bool var);
......
......@@ -60,3 +60,6 @@ QString GetOperNameByStatus(int status)
break;
}
}
//为了以后做准备添加
......@@ -14,8 +14,7 @@ DbsetForm::DbsetForm(QWidget *parent) :
qDebug()<<"gg is"<<gg;
bool hhh = connect(m_dtbase,SIGNAL(connectDbFinsh(bool,QString)),this,SLOT(onConnectDbFinsh(bool,QString)));
qDebug()<< "hhh is " <<hhh;
bool jjlj = connect(ui->btn_Exit,SIGNAL(clicked(bool)),this,SLOT(onExit()));
qDebug()<< "jjlj is " <<jjlj;
connect(ui->btn_Exit,SIGNAL(clicked(bool)),this,SLOT(onExit()));
on_btn_Link_clicked();
}
......@@ -26,7 +25,6 @@ DbsetForm::~DbsetForm()
void DbsetForm::inItUi()
{
this->setWindowFlags(this->windowFlags() | Qt::FramelessWindowHint);
ConfigManger::SqlConnectInfo info;
info = ConfigManger::GetInstance().GetSqlConnectInfo();
qDebug()<<info.host<<info.username<<info.password<<info.database;
......
......@@ -7,10 +7,11 @@
#include "Tool/initclass.h"
#include "Ui/RejectForm.h"
#include "Ui/alertForm.h"
#include <QTreeWidgetItem>
#include "qtreewidget.h"
namespace Ui {
class DetailForm;
}
class DetailForm : public QWidget
{
Q_OBJECT
......@@ -19,45 +20,71 @@ public:
explicit DetailForm(QWidget *parent = 0);
~DetailForm();
static DetailForm& GetInstance();
void initUi();
void showUi(OrderObject *orderObject);//展示详单界面
QString GetPrintData(OrderObject *orderObject,int printtype);
void initconfig();
void Readconfig();
void Writeconfig();
QString storename;
QString _Penny2Dollar(int penny);
int total;
int printsize;
QString Printdata(OrderObject *pData);
QString PrintdataNormal(OrderObject *pData);
QString PrintdataHZL(OrderObject *pData);
int printType;//打印类型的设定
QString m_printName;
bool getVar;
void initUi();
void showUi(OrderObject *orderObject);//展示详单界面
void initconfig();
void Readconfig();
void Writeconfig();
void _GetMatesSelection(QTreeWidgetItem *item, QList<ProductObject*> &selected, QList<ProductObject*> &unselected);
QString GetPrintData(OrderObject *orderObject,int printtype);
QString _Penny2Dollar(int penny);
QString Printdata(OrderObject *pData);
QString PrintdataNormal(OrderObject *pData);
QString PrintdataHZL(OrderObject *pData);
QString PrintLabel(OrderObject *pData);
QString m_printName;
QString storename;
int printType;//打印类型的设定
int total;
int printsize;
bool getVar;
private:
OrderObject *m_orderObject;
RejectForm *m_rejectForm;
QString m_orderid_old;
QString m_orderid_new;
OrderObject *m_orderObject;
RejectForm *m_rejectForm;
void _TableInsertBags(); //计算加料开始
void _TableInsert(ProductObject *obj);//显示产品
void _AssignMate(QTreeWidgetItem *parent, ProductObject *child);
void _UnassignMate(QTreeWidgetItem *parent, ProductObject *child);
void _TableUpdate(ProductObject *obj);
void _TableSetChild(QTreeWidgetItem *parent, ProductObject *child);
void _TableUpdateChild(ProductObject *parent, ProductObject *child);
QTreeWidgetItem* _TableFindBag(const ProductObject *obj);
ProductObject* _ItemToObject(const QTreeWidgetItem * item);
QTreeWidgetItem* _TableFindItem(const ProductObject *obj);
ProductObject* _LoneObjectByName(int bag, const QString &name, const QString &props);
bool _ReadBilledMates();
public:
Ui::DetailForm *ui;
Q_SIGNAL void reEntryOrder(const QString& orderId); //补录订单
Q_SIGNAL void NetreEntryOrder(const QString& orderId);//上传补录
Q_SIGNAL void processOrder(const QString& operation, const QString& orderId, const DeliverObject& deliverObj); // 处理订单1pra操作动作名2pra订单编号3pra配送员信息
Q_SIGNAL void processRejectOrder(const QString& orderId,const int& reason,const int& reasontype);
Q_SIGNAL void sgnToPrint(QString data);
Q_SIGNAL void sgnToPrintNmae();
Q_SIGNAL void DetailshowAlert(alertForm::Type type, const QString& msg);//显示通知窗口
Q_SLOT void sgnReceiveStatusMain(bool var);
Q_SLOT void sltGetPrintName(QString strnmae);
Q_SLOT void printData();//打印机打印数据
Q_SLOT void WriteData();//重新录单
Q_SLOT void printDataNew(OrderObject* orderObject);
Q_SLOT void onOthersOperate();//拒单+完成等
Q_SLOT void onGetStrData(const QString& str);
Q_SLOT void SettingPrintData(QString data);
Q_SIGNAL void reEntryOrder(const QString& orderId); //补录订单
Q_SIGNAL void NetreEntryOrder(const QString& orderId);//上传补录
Q_SIGNAL void processOrder(const QString& operation, const QString& orderId, const DeliverObject& deliverObj); // 处理订单1pra操作动作名2pra订单编号3pra配送员信息
Q_SIGNAL void processRejectOrder(const QString& orderId,const int& reason,const int& reasontype);
Q_SIGNAL void sgnToPrint(QString data,QString label);
Q_SIGNAL void sgnToPrintNmae();
Q_SIGNAL void DetailshowAlert(alertForm::Type type, const QString& msg);//显示通知窗口
Q_SIGNAL void orderMateChanged(const QString &order_id);
Q_SIGNAL void ntFormClose();
Q_SLOT void sgnReceiveStatusMain(bool var);
Q_SLOT void sltGetPrintName(QString strnmae);
Q_SLOT void printData();//打印机打印数据
Q_SLOT void WriteData();//重新录单
Q_SLOT void printDataNew(OrderObject* orderObject,int var);
Q_SLOT void onOthersOperate();//拒单+完成等
Q_SLOT void onGetStrData(const QString& str);
Q_SLOT void SettingPrintData(QString data);
Q_SLOT void printBalance(QString str,QString parameter);
Q_SLOT void onhideUi();
Q_SLOT void onItemClicked(QTreeWidgetItem *item, int col);
};
#endif // DETAILFORM_H
......@@ -117,7 +117,7 @@
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,4">
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
<property name="spacing">
<number>0</number>
</property>
......@@ -159,7 +159,7 @@
</widget>
</item>
<item>
<widget class="QTableWidget" name="merchandisedetails">
<widget class="QTreeWidget" name="merchandisedetails">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
......@@ -193,35 +193,45 @@
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="showGrid">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>35</number>
</attribute>
<column>
<property name="text">
<string>商品名(规格)</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</column>
<column>
<property name="text">
<string>价格</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</column>
<column>
<property name="text">
<string>数量</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</column>
<column>
<property name="text">
<string>PID</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</column>
<column>
<property name="text">
<string>TAG</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</column>
</widget>
</item>
......@@ -449,6 +459,9 @@
<property name="margin">
<number>8</number>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
......
#include "DrinkItem.h"
#include "ui_DrinkItem.h"
DrinkItem::DrinkItem(const QString &name, const QString &mate, QWidget *parent) :
QWidget(parent),
ui(new Ui::DrinkItem)
{
ui->setupUi(this);
_drinkname = name;
_drinkmate = mate;
ui->drinkName->setText(name);
ui->drinkMates->setText(mate);
}
DrinkItem::~DrinkItem()
{
delete ui;
}
QString DrinkItem::drinkMate()
{
return _drinkmate;
}
void DrinkItem::setDrinkMate(const QString &mate)
{
_drinkmate = mate;
ui->drinkMates->setText(_drinkmate);
}
QString DrinkItem::drinkName()
{
return _drinkname;
}
void DrinkItem::setDrinkName(const QString &name)
{
_drinkname = name;
ui->drinkName->setText(_drinkname);
}
#ifndef DRINKITEM_H
#define DRINKITEM_H
#include <QWidget>
namespace Ui {
class DrinkItem;
}
class DrinkItem : public QWidget
{
Q_OBJECT
public:
explicit DrinkItem(const QString &name, const QString &mate, QWidget *parent = 0);
~DrinkItem();
QString drinkMate();
void setDrinkMate(const QString &mate);
QString drinkName();
void setDrinkName(const QString &name);
private:
Ui::DrinkItem *ui;
QString _drinkmate;
QString _drinkname;
};
#endif // DRINKITEM_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DrinkItem</class>
<widget class="QWidget" name="DrinkItem">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>127</width>
<height>32</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="drinkName">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>127</width>
<height>15</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>127</width>
<height>15</height>
</size>
</property>
<property name="text">
<string>测试商品</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="drinkMates">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>127</width>
<height>15</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>127</width>
<height>15</height>
</size>
</property>
<property name="text">
<string>测试</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
......@@ -13,7 +13,11 @@ KeyBoardForm::KeyBoardForm(QWidget *parent) :
this->setWindowFlags(Qt::FramelessWindowHint);
this->setAttribute(Qt::WA_TranslucentBackground);
QRect deskRect = QApplication::desktop()->availableGeometry();
this->move(deskRect.width()*4/5+50, deskRect.height()*3/5-30);
qDebug()<<"deskRect.width() " <<deskRect.width();
qDebug()<<"deskRect.height() " <<deskRect.height();
qDebug()<<"deskRect.width() " <<deskRect.width()*158600/192000;
qDebug()<<"deskRect.height() " ;
this->move(deskRect.width()*826/1000-(1920-deskRect.width())*78/1000, deskRect.height()*588/1000-(1050-deskRect.height())*410/1000);
InitGroupButton();
this->hide();
}
......@@ -52,7 +56,6 @@ void KeyBoardForm::InitGroupButton()
void KeyBoardForm::onKeyBtnClose()
{
emit clearValue();
qDebug()<<"clear is";
}
void KeyBoardForm::onKeyBtnDel()
......
......@@ -36,10 +36,9 @@ public:
void styleshow();
void InitstyleMain();
void unRegisterInitstyle();
bool ReadData(QString strId);
void RemoveFile();
void WriteData(QString strdata);
int changeTime();
QString GetOperaBtnNameByVID(int curr);
void onTableItemClickedNew(QTableWidgetItem *item);
void OrderMateChanged(const QString &order_id);
// void onMainTableitem(QTableWidgetItem *item,int i);
private:
......@@ -62,6 +61,8 @@ private:
QTableWidget *m_currentTable; // 当前选中的表
bool m_reset;
QString m_date;
// 记录是否存在详单页面和正在处理的提示框
bool m_bexistDetailsForm;
//SysTray *m_tray; // 系统托盘
public:
......@@ -74,7 +75,7 @@ public:
Q_SIGNAL void getOrderDetails(const QString& orderId);//获取订单详情信号
Q_SIGNAL void sgnMainHome(QString path); //path 获取图片的绝对位置
Q_SIGNAL void sgnSound(int type);// 声音
Q_SIGNAL void sgnToClass(QString data);//来自initclass打印机的信号
Q_SIGNAL void sgnToClass(QString data,QString label);//来自initclass打印机的信号
Q_SIGNAL void sgnPrintNameInit();
Q_SIGNAL void sgnSendPrintNameInit(QString str);
Q_SIGNAL void sgnReceiveStatusInit(bool var);
......@@ -86,11 +87,10 @@ public:
Q_SLOT void OnBtnCashier(); //查看在线收银员
Q_SLOT void OnBtnHide(); //隐藏按钮
Q_SLOT void OnBtnSet(); //设置按钮
Q_SLOT void onChangeOrderStatusTest();
Q_SLOT void getKegBoadNum(QString str);
Q_SLOT void clearValue();
Q_SLOT void insertValue();
Q_SLOT void onChangeOrderStatus(OrderObject *orderObject, int oldStatus);//更改订单列表信息 1pra.订单对象 2pra旧的订单
Q_SLOT void onChangeOrderStatus(OrderObject *orderObject,int oldStatus);//更改订单列表信息 1pra.订单对象 2pra旧的订单
Q_SLOT void onMainProcBtnClicked();
Q_SLOT void onShowAlert(alertForm::Type type, const QString &msg);
Q_SLOT void onTime();
......@@ -109,9 +109,11 @@ public:
Q_SLOT void onMainBtnDown();
Q_SLOT void onMainbtnUp();
Q_SLOT void onMainClose();
Q_SLOT void OnResetHide(bool var);
Q_SLOT void OnshowMainUi();
Q_SLOT void OnBtnSettlement();
// Q_SLOT void OnResetHide(bool var);
// Q_SLOT void OnshowMainUi();
Q_SLOT void showMain();
Q_SLOT void onOrderMateChanged(const QString &order_id);
};
......
#include "MateChooser.h"
#include "ui_MateChooser.h"
#include <QDebug>
MateChooser::MateChooser(QWidget *parent) :
QDialog(parent),
ui(new Ui::MateChooser)
{
ui->setupUi(this);
setWindowFlags(windowFlags()|Qt::FramelessWindowHint);
setAttribute(Qt::WA_PaintOnScreen);
setAttribute(Qt::WA_QuitOnClose, false);
_group.setExclusive(false);
connect(&_group, SIGNAL(buttonClicked(QAbstractButton*)), SLOT(onMateItemClicked(QAbstractButton*)));
connect(ui->mateCancel,SIGNAL(clicked(bool)),this,SLOT(on_mateCancel_clicked()));
connect(ui->mateConfirm,SIGNAL(clicked(bool)),SLOT(on_mateConfirm_clicked()));
}
MateChooser::~MateChooser()
{
delete ui;
}
void MateChooser::setTitle(const QString &t)
{
ui->mateTitle->setText(t);
}
QString MateChooser::getTitle() const
{
return ui->mateTitle->text();
}
QList<ProductObject *> MateChooser::candidates()
{
QList<ProductObject *> list;
QStringList keys = _candidates_map.keys();
foreach(QString k, keys) {
list << _candidates_map[k];
}
return list;
}
void MateChooser::setMates(const QList<ProductObject*> &pendingMates, QList<ProductObject*> &assignedMates)
{
qDebug()<<"pendingMates is" <<pendingMates;
qDebug()<<"assignedMates is" <<assignedMates;
_selected_mates = assignedMates;
foreach(ProductObject *amo, assignedMates) {
qDebug()<<"amo->name is"<<amo->name;
_candidates_map[amo->name] = amo;
}
foreach(ProductObject *mo, pendingMates) {
qDebug()<<"mo->name is"<<mo->name;
qDebug()<<mo;
if (!_candidates_map.contains(mo->name)) {
_candidates_map[mo->name] = mo;
}
}
int row = 0, col = 0;
_group.buttons().clear();
QStringList keys = _candidates_map.keys();
foreach(QString k, keys) {
qDebug()<<"k is" <<k;
ProductObject *mate = _candidates_map[k];
QPushButton *mate_btn = new QPushButton(mate->name);
mate_btn->setFocusPolicy(Qt::NoFocus);
mate_btn->setCheckable(true);
if (_selected_mates.contains(mate)) {
mate_btn->setChecked(true);
}
mate_btn->setMinimumSize(60, 40);
mate_btn->setMaximumSize(60, 40);
ui->mateList->addWidget(mate_btn, row, col);
_group.addButton(mate_btn);
++col;
if (col > 2) {
++row;
col = 0;
}
}
}
QList<ProductObject *> MateChooser::selectedMates() const
{
if (this->result() == QDialog::Accepted) {
return _selected_mates;
}
else {
return QList<ProductObject*>();
}
}
void MateChooser::on_mateCancel_clicked()
{
QDialog::reject();
}
void MateChooser::on_mateConfirm_clicked()
{
QDialog::accept();
}
void MateChooser::onMateItemClicked(QAbstractButton *item)
{
if (item->isChecked()) {
_selected_mates << _candidates_map[item->text()];
}
else {
_selected_mates.removeOne(_candidates_map[item->text()]);
}
}
#ifndef MATECHOOSER_H
#define MATECHOOSER_H
#include <QDialog>
#include "Model/productObject.h"
#include <QButtonGroup>
namespace Ui {
class MateChooser;
}
class MateChooser : public QDialog
{
Q_OBJECT
public:
explicit MateChooser(QWidget *parent = 0);
~MateChooser();
void setTitle(const QString &t);
void setMates(const QList<ProductObject *> &pendingMates, QList<ProductObject *> &assignedMates);
QString getTitle() const;
QList<ProductObject *> candidates();
QList<ProductObject *> selectedMates() const;
public:
Q_SLOT void on_mateCancel_clicked();
Q_SLOT void on_mateConfirm_clicked();
Q_SLOT void onMateItemClicked(QAbstractButton *item);
private:
Ui::MateChooser *ui;
QButtonGroup _group;
QList<ProductObject *> _selected_mates;
QMap<QString, ProductObject*> _candidates_map;
};
#endif // MATECHOOSER_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MateChooser</class>
<widget class="QDialog" name="MateChooser">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>284</width>
<height>254</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="mateTitle">
<property name="minimumSize">
<size>
<width>0</width>
<height>34</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWithContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>266</width>
<height>125</height>
</rect>
</property>
<layout class="QGridLayout" name="mateList">
<property name="leftMargin">
<number>16</number>
</property>
<property name="topMargin">
<number>16</number>
</property>
<property name="rightMargin">
<number>16</number>
</property>
<property name="bottomMargin">
<number>16</number>
</property>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>15</number>
</property>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="mateConfirm">
<property name="minimumSize">
<size>
<width>80</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>确认</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="mateCancel">
<property name="minimumSize">
<size>
<width>80</width>
<height>40</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
<height>40</height>
</size>
</property>
<property name="text">
<string>取消</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
......@@ -54,7 +54,7 @@ void PrintSetting::InitUi()
PRINTER_INFO_5 *pPrnInfo=(PRINTER_INFO_5 *)pBuffer;
for(int i=0;i <dwPrinters;i++)
{
QString name = QString :: fromStdWString(pPrnInfo->pPrinterName);
QString name = QString::fromStdWString(pPrnInfo->pPrinterName);
ui->print_comboBox->addItem(name);
if(!name.compare(printer))
{
......
......@@ -61,7 +61,7 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_37" stretch="1,0,0,0,1,1">
<layout class="QHBoxLayout" name="horizontalLayout_37" stretch="1,0,0,0,1,1,0">
<property name="spacing">
<number>5</number>
</property>
......@@ -496,13 +496,13 @@
<widget class="QPushButton" name="mainBtnHide">
<property name="minimumSize">
<size>
<width>50</width>
<width>40</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<width>40</width>
<height>30</height>
</size>
</property>
......@@ -518,13 +518,13 @@
<widget class="QPushButton" name="mainBtnSet">
<property name="minimumSize">
<size>
<width>50</width>
<width>40</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<width>40</width>
<height>30</height>
</size>
</property>
......@@ -536,6 +536,25 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="mainBtnSettlement">
<property name="minimumSize">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>40</width>
<height>30</height>
</size>
</property>
<property name="text">
<string>结算</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
......@@ -1290,6 +1309,125 @@
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_fm_label">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>25</height>
</size>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>120</red>
<green>120</green>
<blue>120</blue>
</color>
</brush>
</colorrole>
<colorrole role="Text">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>120</red>
<green>120</green>
<blue>120</blue>
</color>
</brush>
</colorrole>
<colorrole role="ButtonText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>120</red>
<green>120</green>
<blue>120</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="font">
<font>
<family>微软雅黑</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>由 非码© 提供技术支持</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="mainLabPlacard">
<property name="maximumSize">
<size>
......
......@@ -45,7 +45,9 @@ SOURCES +=fmp_takeout.cpp \
Thread/workThread/OtherThreadctr.cpp \
Thread/workThread/NetStoreInfo.cpp \
Ui/RejectForm.cpp \
Tool/HttpSocket.cpp
Tool/HttpSocket.cpp\
Ui/DrinkItem.cpp \
Ui/MateChooser.cpp
HEADERS +=fmp_takeout_i.h \
fmp_takeout.h \
......@@ -90,7 +92,9 @@ HEADERS +=fmp_takeout_i.h \
Thread/workThread/NetStoreInfo.h \
Ui/RejectForm.h \
Tool/HttpSocket.h \
fmp_takeout_def.h
fmp_takeout_def.h \
Ui/DrinkItem.h \
Ui/MateChooser.h
FORMS += \
Ui/mainwindow.ui \
......@@ -102,7 +106,9 @@ FORMS += \
Ui/KeyBoardForm.ui \
Ui/ChooseForm.ui \
Ui/alertForm.ui \
Ui/RejectForm.ui
Ui/RejectForm.ui \
Ui/DrinkItem.ui \
Ui/MateChooser.ui
unix {
target.path = /usr/lib
......
......@@ -8,5 +8,10 @@
#define FMP_INIKEY_TAKEOUTENTRYSERVER "Takeout/Entryurl"
#define FMP_INIKEY_TAKEOUTAUTO "Takeout/AutoConfirm"
#define FMP_INIKEY_TAKEOUTSERVER "Takeout/Server"
#define FMP_INIPATH_COMMFILE_MATES "Takeout/mates" //添加加料所需要的东西
#define FMP_INIPATH_WRITE_BILL "Takeout/bill" //写销售单
#define FMP_INIPATH_WRITE_BILL_PATH "Takeout/billpath" //写销售单
#define FMP_INIKEY_TAKEOUT_PORT "Takeout/slipPort"
#define FMP_INIKEY_TAKEOUT_IP "Takeout/slipIp"
#endif // FMP_TAKEOUT_DEF_H
......@@ -30,18 +30,7 @@ int FMPTakeoutPrivate::Init()
{
_Home = q->GetService<FMPHomeInterface>(q->_ctx);
_Printer= q->GetService<FMPPrinterInterface>(q->_ctx);
connect(&InitClass::GetInstance(),&InitClass::sgnHome,this,&FMPTakeoutPrivate::sltHome);
connect(&InitClass::GetInstance(),&InitClass::sgnStopRemind,this,&FMPTakeoutPrivate::sltStopBlink);
connect(this,&FMPTakeoutPrivate::sgnGetFromHome,&InitClass::GetInstance(),&InitClass::sgnMainUi);
connect(&InitClass::GetInstance(),&InitClass::sgnPrintdate,this,&FMPTakeoutPrivate::sltPrint);
connect(&InitClass::GetInstance(),&InitClass::sgnPrintName2,this,&FMPTakeoutPrivate::sltPrintName);
connect(this,&FMPTakeoutPrivate::sgnSendPrintName,&InitClass::GetInstance(),&InitClass::sgnSendPrintName);
connect(this,&FMPTakeoutPrivate::sgnReceiveStatus,&InitClass::GetInstance(),&InitClass::sgnReceStatus);
connect(this,&FMPTakeoutPrivate::sgnStopTime,&InitClass::GetInstance(),&InitClass::sgnGetThreadnet);
InitClass::GetInstance().inItGloal();
// InitClass::GetInstance().LoadDll();
InitClass::GetInstance().InitLogger();
InitClass::GetInstance().InitDialog();
InitApp();
q->_inited = true;
return FMP_SUCCESS;
}
......@@ -90,10 +79,10 @@ void FMPTakeoutPrivate::sltStopBlink(int type)
_Home->stopBlink(q_ptr);
}
void FMPTakeoutPrivate::sltPrint(QString data)
void FMPTakeoutPrivate::sltPrint(QString data,QString label)
{
if (_Printer) {
emit sgnReceiveStatus(_Printer->DoPrint(data));
emit sgnReceiveStatus(_Printer->DoPrint(data,label));
}
}
......@@ -105,3 +94,18 @@ void FMPTakeoutPrivate::sltPrintName()
emit sgnSendPrintName(_Printer->GetPrintName());
}
}
void FMPTakeoutPrivate::InitApp()
{
connect(&InitClass::GetInstance(),&InitClass::sgnHome,this,&FMPTakeoutPrivate::sltHome);
connect(&InitClass::GetInstance(),&InitClass::sgnStopRemind,this,&FMPTakeoutPrivate::sltStopBlink);
connect(this,&FMPTakeoutPrivate::sgnGetFromHome,&InitClass::GetInstance(),&InitClass::sgnMainUi);
connect(&InitClass::GetInstance(),&InitClass::sgnPrintdate,this,&FMPTakeoutPrivate::sltPrint);
connect(&InitClass::GetInstance(),&InitClass::sgnPrintName2,this,&FMPTakeoutPrivate::sltPrintName);
connect(this,&FMPTakeoutPrivate::sgnSendPrintName,&InitClass::GetInstance(),&InitClass::sgnSendPrintName);
connect(this,&FMPTakeoutPrivate::sgnReceiveStatus,&InitClass::GetInstance(),&InitClass::sgnReceStatus);
connect(this,&FMPTakeoutPrivate::sgnStopTime,&InitClass::GetInstance(),&InitClass::sgnGetThreadnet);
InitClass::GetInstance().inItGloal();
InitClass::GetInstance().InitLogger();
InitClass::GetInstance().InitDialog();
}
......@@ -14,6 +14,7 @@ public:
int Init();
int Uninit();
~FMPTakeoutPrivate();
void InitApp();
private:
......@@ -24,7 +25,7 @@ public:
FMPSettingsInterface *_settings;
Q_SLOT void sltHome(QString path);
Q_SLOT void sltStopBlink(int type);
Q_SLOT void sltPrint(QString data);
Q_SLOT void sltPrint(QString data,QString label);
Q_SLOT void sltPrintName();
Q_SIGNAL void sgnGetFromHome();
Q_SIGNAL void sgnQuitThread();
......
No preview for this file type
......@@ -32,5 +32,7 @@
<file>image/pickBtn_select.png</file>
<file>image/tabBtn_checked.png</file>
<file>image/tabBtn_normal.png</file>
<file>image/branch_close.png</file>
<file>image/branch_open.png</file>
</qresource>
</RCC>
......@@ -23,5 +23,7 @@
<file>delBtn_press.png</file>
<file>numBtn_normal.png</file>
<file>numBtn_press.png</file>
<file>branch_close.png</file>
<file>branch_open.png</file>
</qresource>
</RCC>
\ No newline at end of file
......@@ -26,7 +26,7 @@ QWidget
color: #262626;
border-image: url(:tabBtn_checked.png);
}
#mainBtnHide,#mainBtnSet
#mainBtnHide,#mainBtnSet,#mainBtnSettlement
{
color: rgb(255, 255, 255);
background-color: #a02125;
......@@ -76,6 +76,11 @@ QWidget
color: #b9b9b9;
background-color: #262626;
}
#label_fm_label
{
color: #b9b9b9;
background-color: #262626;
}
#mainSlabStoreid,#mainSlabOpeStatus,#mainSlabNetStatus,#mainSlabVersion,#mainSlabCashier,
#mainSlabTime,#mainLabStoreid,#mainLabOpeStatus,#mainLabNetStatus,#mainLabVersion,#mainLabCashier
{
......@@ -420,35 +425,107 @@ QWidget
color: #4b4b4b;
background-color: #f9f9f9;
}
#merchandisedetails
#merchandisedetails QHeaderView
{
background-color: #ffffff;
color: #333333;
margin-left: -1px;
}
#merchandisedetails QHeaderView::section
{
border: 0px;
background: #ffffff;
color: #636363;
#merchandisedetails QHeaderView::section
{
border: 0px solid rgb(56, 104, 53);
border-left: 1px solid rgb(238, 238, 238);
background: rgb(205, 214, 220);
color: rgb(134, 134, 134);
font-size: 9pt;
font-weight: bold;
min-height: 40px;
}
#merchandisedetails QScrollBar:vertical
#merchandisedetails QScrollBar:vertical
{
background: rgb(180, 205, 163, 0);
background: rgb(180, 205, 163);
width: 10px;
margin: 0;
}
#merchandisedetails QScrollBar::handle:vertical
#merchandisedetails QScrollBar::handle:vertical
{
border-radius: 6px;
border-radius: 6px;
background: rgb(207, 234, 187);
min-height: 20px;
}
#merchandisedetails QScrollBar::add-line:vertical,
#merchandisedetails QScrollBar::sub-line:vertical
#merchandisedetails QScrollBar::add-line:vertical
{
height: 0px;
}
#merchandisedetails QScrollBar::sub-line:vertical
{
height: 0px;
}
#merchandisedetails QScrollBar::add-page:vertical,
#merchandisedetails QScrollBar::sub-page:vertical
{
background: rgb(180, 205, 163);
height: 0px;
}
#merchandisedetails
{
gridline-color: rgb(200, 200, 200);
background-color: rgb(236, 247, 248);
selection-background-color: rgb(247, 243, 239);
color: rgb(98, 98, 98);
}
/* Item Widget START*/
#drinkName {
padding-left: 6;
padding-top: 12;
font-size: 10pt;
color: transparent;
}
#drinkMates {
padding-right: 10;
font-size: 9pt;
color: rgb(228, 60, 30);
}
/* Item Widget END*/
#merchandisedetails::item {
min-height: 35; max-height: 35;
border-bottom: 1px solid #d9d9d9;
border-right: 1 solid #d9d9d9;
color: rgb(80, 80, 80);
}
#merchandisedetails::item:selected {
background: rgb(247, 243, 239);
}
/*
#merchandisedetails::item:has-children {
color: rgb(228, 60, 30);
}
*/
#merchandisedetails::branch {
border-image: none;
background: transparent;
border-bottom: 1px solid #d9d9d9;
}
#merchandisedetails::branch:selected {
background: rgb(247, 243, 239);
}
#merchandisedetails::branch:has-children:!has-siblings:closed,
#merchandisedetails::branch:closed:has-children:has-siblings {
padding-left: 4;
image: url(:/images/branch_close.png);
}
#merchandisedetails::branch:open:has-children:!has-siblings,
#merchandisedetails::branch:open:has-children:has-siblings {
padding-left: 4;
image: url(:/images/branch_open.png);
}
/*---------------------------------DetailForm[ end ]---------------------------------*/
/*---------------------------------RejectForm[start]-------------------------------------*/
#RejectForm
......@@ -479,6 +556,42 @@ QWidget
}
/*---------------------------------RejectForm[end]-------------------------------------*/
/*---------------------------------MateChooser[begin]---------------------------------*/
#MateChooser
{
background-color: rgb(255, 255, 255);
border: 1 solid rgb(230, 230, 230);
}
#mateTitle
{
color: rgb(255, 255, 255);
font-size: 11pt;
background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(236, 174, 102), stop:0.5 rgba(236, 128, 69), stop:0.51 rgba(248, 105, 39), stop:1 rgba(238, 172, 102));
}
#mateList
{
border: 0 solid silver;
background-color: white;
margin: 10px;
}
#mateCancel, #mateConfirm
{
font-size: 9pt;
color: rgb(255, 255, 255);
background-color: rgb(248, 105, 41);
border-radius: 3px;
}
#mateCancel:pressed,#mateConfirm:pressed
{
font-size: 9pt;
color: rgb(161, 161, 161);
background-color: rgb(197, 83, 32);
border-radius: 3px;
}
/*---------------------------------MateChooser[ end ]---------------------------------*/
......
No preview for this file type
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