Commit c25275b8 by 李定达

1.界面区分非码外卖和非码自提单;2.自提单杯贴打印跟取餐码;3.外卖单杯贴打印跟订单号;4.POSDLL.dll回滚到旧版本(新版本多次重复(1070次加载左…

1.界面区分非码外卖和非码自提单;2.自提单杯贴打印跟取餐码;3.外卖单杯贴打印跟订单号;4.POSDLL.dll回滚到旧版本(新版本多次重复(1070次加载左右)加载导致抛出异常);5.版本号自增;6.修改多机打印杯贴打印配置到print.ini
parent 634a6b3d
......@@ -7,6 +7,7 @@
#include <QDateTime>
#include <QStringList>
#include <QsLog.h>
#include <QDateTime>
......@@ -67,6 +68,9 @@ void PrintLib::_PrintLab( OrderObject* order)
{
QString deliveryTime;
QString datetime;
int tmpdelitime = order->delivery_time;
if(order->delivery_time==0)
{
deliveryTime = QDateTime::currentDateTime().toString("hh:mm");
......@@ -99,11 +103,11 @@ void PrintLib::_PrintLab( OrderObject* order)
if(order->order_type == 3 || order->order_type == 4 || order->order_type == 5 || order->order_type == 6)
{
tmptitle = QString("\xE8\x87\xAA\xE6\x8F\x90").append(title).append(order->code);
tmptitle = QString("\xE8\x87\xAA\xE6\x8F\x90").append(order->code).append(title);
}
else
{
tmptitle = QString("\xE5\xA4\x96\xE5\x8D\x96").append(title).append(order->order_index);
tmptitle = QString("\xE5\xA4\x96\xE5\x8D\x96").append(QString::number(order->order_index)).append(title);
}
f_TSCWinPrintln(0,0,22,0,2,0,0,QString("\xE5\xAE\x8B\xE4\xBD\x93").toLocal8Bit().data(),tmptitle.toLocal8Bit().data(),0);
......@@ -127,6 +131,16 @@ void PrintLib::_PrintLab( OrderObject* order)
}
property_tags.remove(property_tags.length()-1,1);
f_TSCWinPrintln(10,0,24,0,2,2,0,QString("\xE5\xAE\x8B\xE4\xBD\x93").toLocal8Bit().data(),property_tags.toLocal8Bit().data(),0.0666665);
//预约送达
QString sendtimes = QString("\xE9\xA2\x84\xE7\xBA\xA6\xE9\x80\x81\xE8\xBE\xBE\x3A");
if(tmpdelitime != 0 && (order->order_type == 1 || order->order_type == 2))
{
sendtimes.append(QDateTime::fromTime_t(order->delivery_time).toString("yyyy-MM-dd hh:mm:ss"));
f_TSCWinPrintln(10,140,24,0,2,2,0,QString("\xE5\xAE\x8B\xE4\xBD\x93").toLocal8Bit().data(),sendtimes.toLocal8Bit().data(),0.0666665);
}
f_TSCWinPrintln(10,180,26,0,2,0,0,QString("\xE5\xAE\x8B\xE4\xBD\x93").toLocal8Bit().data(),order->store_name.toLocal8Bit().data(),0.0666665);
//qDebug() << "up f_TSCWinPrintPage";
......@@ -167,7 +181,8 @@ bool PrintLib::DoPrint(const QByteArray &content, OrderObject *orderObject, QStr
_PrintLineNode(doc,_order);
QString confilename = qApp->applicationDirPath() + "/" + "config.ini";
int needlabel = QSettings(confilename, QSettings::IniFormat).value("all/needlabel", 0).toInt();
QString tmpconfilename = qApp->applicationDirPath() + "/" + "printer.ini";
int needlabel = QSettings(tmpconfilename, QSettings::IniFormat).value("all/needlabel", 0).toInt();
if(needlabel)
_PrintLab(_order);
......@@ -209,7 +224,8 @@ bool PrintLib::DoPrint(const QString &content, OrderObject *orderObject, QString
_PrintLineNode(doc,_order);
QString confilename = qApp->applicationDirPath() + "/" + "config.ini";
int needlabel = QSettings(confilename, QSettings::IniFormat).value("all/needlabel", 0).toInt();
QString tmpconfilename = qApp->applicationDirPath() + "/" + "printer.ini";
int needlabel = QSettings(tmpconfilename, QSettings::IniFormat).value("all/needlabel", 0).toInt();
if(needlabel)
_PrintLab(_order);
......
......@@ -125,7 +125,7 @@ bool orderprintwork::event(QEvent *e)
}
}
QString otherfile = qApp->applicationDirPath() + "/" + CONFIG_NAME;
QString otherfile = qApp->applicationDirPath() + "/" + PREINTER_CONSS;
int needptr = QSettings(otherfile, QSettings::IniFormat).value(INI_NEEDPTR, 0).toInt();
......
......@@ -4,8 +4,8 @@
#include <winver.h>
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,6
PRODUCTVERSION 2,0,0,6
FILEVERSION 2,0,0,7
PRODUCTVERSION 2,0,0,7
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
......@@ -22,12 +22,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
VALUE "CompanyName", "ShangHai Freemud Co., Ltd."
VALUE "FileDescription", "FREEMUD Manager System"
VALUE "FileVersion", "2.0.0.6"
VALUE "FileVersion", "2.0.0.7"
VALUE "InternalName", "FREEMUD"
VALUE "LegalCopyright", "Copyright (C)2017-2020"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "fmTakeout"
VALUE "ProductVersion", "2.0.0.6"
VALUE "ProductVersion", "2.0.0.7"
END
END
BLOCK "VarFileInfo"
......
......@@ -577,8 +577,15 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject)
m_order_table_map.insert(orderObject->order_id, table);
QString tmpchannel;
if(orderObject->order_type == 1 || orderObject->order_type == 2)
tmpchannel = QString("\xE9\x9D\x9E\xE7\xA0\x81\xE5\xA4\x96\xE5\x8D\x96");
else
tmpchannel = QString("\xE9\x9D\x9E\xE7\xA0\x81\xE8\x87\xAA\xE6\x8F\x90");
table->insertRow(0);
QTableWidgetItem *item0 = new QTableWidgetItem(QString::number(orderObject->order_index)+"#"+orderObject->channel_name);
QTableWidgetItem *item0 = new QTableWidgetItem(QString::number(orderObject->order_index)+"#"+tmpchannel);
item0->setTextAlignment(Qt::AlignCenter);
table->setItem(0, 0, item0); // 渠道
QTableWidgetItem *item1 = new QTableWidgetItem(orderObject->order_id);
......
......@@ -371,9 +371,9 @@ void PrtSettingForm::on_pushButton_save_clicked()
QString confilename = qApp->applicationDirPath() + "/" + CONFIG_NAME;
if(ui->checkBox_dbprt->isChecked())
QSettings(confilename, QSettings::IniFormat).setValue(INI_NEEDPTR, 1);
QSettings(filename, QSettings::IniFormat).setValue(INI_NEEDPTR, 1);
else
QSettings(confilename, QSettings::IniFormat).setValue(INI_NEEDPTR, 0);
QSettings(filename, QSettings::IniFormat).setValue(INI_NEEDPTR, 0);
QSettings(filename, QSettings::IniFormat).setValue(session + "/" + "usb", ui->lineEdit_usb->text());
QSettings(filename, QSettings::IniFormat).setValue(session + "/" + "parallel", ui->lineEdit_lpt->text());
......@@ -402,12 +402,13 @@ void PrtSettingForm::on_btn_lab_save_clicked()
else
labtype = "1";
QString filename = qApp->applicationDirPath() + "/" + PREINTER_CONSS;
QString confilename = qApp->applicationDirPath() + "/" + CONFIG_NAME;
if(ui->checkBox_needlabel->isChecked())
QSettings(confilename, QSettings::IniFormat).setValue(INI_NEEDLABEL, 1);
QSettings(filename, QSettings::IniFormat).setValue(INI_NEEDLABEL, 1);
else
QSettings(confilename, QSettings::IniFormat).setValue(INI_NEEDLABEL, 0);
QSettings(filename, QSettings::IniFormat).setValue(INI_NEEDLABEL, 0);
QString wigth = ui->lineEdit_lab_widgh->text();
QString high = ui->lineEdit_lab_high->text();
......@@ -415,8 +416,6 @@ void PrtSettingForm::on_btn_lab_save_clicked()
if(wigth.isEmpty() || labelname.isEmpty() || high.isEmpty())
return ;
QString filename = qApp->applicationDirPath() + "/" + PREINTER_CONSS;
QSettings(filename, QSettings::IniFormat).setValue(session + "/" + "Printlabel", labelname);
QSettings(filename, QSettings::IniFormat).setValue(session + "/" + "wigth", wigth);
QSettings(filename, QSettings::IniFormat).setValue(session + "/" + "high", high);
......
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