Commit 1d7dc8da by ss.dai

1:增加写升级程序需要的信息到配置文件2:替换声音文件

parent 30d909a2
......@@ -11,6 +11,7 @@
#include <QTimer>
#include <QDir>
#include <QApplication>
#include <QHostInfo>
FlowControl &FlowControl::GetInstance()
{
......@@ -33,6 +34,19 @@ bool FlowControl::_GetStoreInfo()
emit showAlert(AlertForm::LOADING, "正在获取门店信息......");
QLOG_INFO() << QString("[---get storeInfo---]");
result = FmPlugin::GetInstance().GetStoreInfo(m_storeId, m_posId, m_cashierId, m_bDate, error);
/// 为了配合升级程序在此处获取到门店号则将其写入配置文件
/// ../storeInfo.ini -- info/store_id -- info/pos_no
QString iniPath = QString("%1/../storeInfo.ini").arg(QApplication::applicationDirPath());
QSettings setting(iniPath ,QSettings::IniFormat);
if(!setting.contains("info/store_id"))
{
qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
setting.setValue("info/store_id", m_storeId);
setting.setValue("info/pos_no", qrand());
}
QLOG_INFO() << QString("get storeInfo finsh. [result:%1][msg:%2][storeId:%3,posId:%4,cashierId:%5,bdate:%6]")
.arg(result).arg(error, m_storeId, m_posId, m_cashierId, m_bDate.toString("yyyy-MM-dd"));
......@@ -159,8 +173,6 @@ bool FlowControl::_PullOrder()
}
}
// 当天完成的订单,尝试重复入账一次
qDebug() << QDateTime::fromTime_t(orderObject->create_time).date() << QDate::currentDate();
if((orderObject->status==6||orderObject->status==200)&&(QDateTime::fromTime_t(orderObject->create_time).date()==QDate::currentDate()))
{
// 写入销售单
......
......@@ -313,7 +313,7 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus)
tabBtn = _GetTabBtnByOrderStatus(orderObject->status);
table = findChild<QTableWidget*>(tabBtn->property("tableName").toString());
table->insertRow(0);
QTableWidgetItem *item0 = new QTableWidgetItem(orderObject->channelName);
QTableWidgetItem *item0 = new QTableWidgetItem(QString("%1#%2").arg(orderObject->channelName).arg(orderObject->order_index));
item0->setTextAlignment(Qt::AlignCenter);
table->setItem(0, 0, item0); // 渠道
QTableWidgetItem *item1 = new QTableWidgetItem(orderObject->order_id);
......
No preview for this file type
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