Commit d2c36461 by yunpeng.song

暂时屏蔽一些订单操作按钮,新订单时点击屏幕指定区域

parent c63739b6
......@@ -248,6 +248,8 @@ private slots:
QString _GetIpAddress();
void _AddOrder(const QString& orderId,const QString& channel,const int& pageNumber=1,const int& pageSize=100);
void _GetOrder(const QString& orderId,const QString& channel);
//点击屏幕指定区域
void _ClickOMSAssignArea();
......
......@@ -140,5 +140,10 @@ QString ConfigManger::GetIpAddress()
return m_config->value("IpAddress/ip").toString();
}
QPoint ConfigManger::GetOMSBtnPostion()
{
return m_userConfig->value(INI_OMSBTNPOSTION).toPoint();
}
......@@ -121,6 +121,8 @@ public:
QString GetIpAddress();
QPoint GetOMSBtnPostion();
private:
ConfigManger();
ConfigManger(ConfigManger const&);
......
......@@ -35,22 +35,13 @@ QJsonObject DataManger::GetLoginData(const QString &partnerId, const QString &st
const QString &stationId, const QString &cashierId, const QString &ipAddress)
{
QJsonObject rObj;
#ifdef TEST
rObj.insert(JSON_IPADDRESS, ipAddress);
rObj.insert(JSON_PARTNERID,"7ba9ce8d-4ffd-4acf-96e6-42a117ad6fe6");
rObj.insert(JSON_ORGCODE, storeId);
rObj.insert(JSON_PASSWORD, password);
rObj.insert(JSON_MACHINECODE, stationId);
//rObj.insert(JSON_USERID, cashierId);
#else
QJsonObject rObj;
rObj.insert(JSON_IPADDRESS, ipAddress);
rObj.insert(JSON_PARTNERID,partnerId);
rObj.insert(JSON_ORGCODE, storeId);
rObj.insert(JSON_PASSWORD, password);
rObj.insert(JSON_MACHINECODE, stationId);
//rObj.insert(JSON_USERID, cashierId);
#endif
return rObj;
}
......@@ -58,22 +49,12 @@ QJsonObject DataManger::GetHeartData(const QString &partnerId, const QString &st
const QString &stationId, const QString &cashierId, const QString &ipAddress)
{
QJsonObject rObj;
#ifdef TEST
rObj.insert(JSON_IPADDRESS, ipAddress);
rObj.insert(JSON_PARTNERID,"7ba9ce8d-4ffd-4acf-96e6-42a117ad6fe6");
rObj.insert(JSON_PARTNERID,partnerId);
rObj.insert(JSON_ORGCODE, storeId);
rObj.insert(JSON_PASSWORD, password);
rObj.insert(JSON_MACHINECODE, stationId);
//rObj.insert(JSON_USERID, cashierId);
#else
QJsonObject rObj;
rObj.insert(JSON_IPADDRESS, ipAddress);
rObj.insert(JSON_PARTNERID,partnerId);
rObj.insert(JSON_STOREID, storeId);
rObj.insert(JSON_PASSWORD, password);
rObj.insert(JSON_POSNO, stationId);
//rObj.insert(JSON_USERID, cashierId);
#endif
return rObj;
}
......@@ -87,18 +68,10 @@ QJsonObject DataManger::GetPullOrderData(const QString &orderId, const QString &
rObj.insert(JSON_PAGENUMBER,pageNumber);
rObj.insert(JSON_PAGESIZE,pageSize);
}
#ifdef TEST
rObj.insert(JSON_BUSINESSID,orderId);
rObj.insert(JSON_CHANNEL, channel);
rObj.insert(JSON_SHOPCODE,storeId);
#else
rObj.insert(JSON_BUSINESSID,orderId);
rObj.insert(JSON_CHANNEL, channel);
rObj.insert(JSON_SHOPCODE,storeId);
//rObj.insert(JSON_AUTOCONFIRM, autoconfirm);
#endif
return rObj;
}
......@@ -160,19 +133,11 @@ QJsonObject DataManger::GetCompleteOrderData(const QString &orderId)
QJsonObject DataManger::GetRefundOrderData(const QString &reason, const QString &orderId,const QString& channel)
{
QJsonObject rObj;
#ifdef TEST
rObj.insert(JSON_BUSINESSID, orderId);
rObj.insert(JSON_REASON, reason);
rObj.insert(JSON_CODE, -1);
rObj.insert(JSON_CHANNEL,channel);
rObj.insert(JSON_SHOPCODE, m_storeId);
#else
rObj.insert(JSON_BUSINESSID, orderId);
rObj.insert(JSON_REASON, reason);
rObj.insert(JSON_CODE, -1);
rObj.insert(JSON_CHANNEL,channel);
rObj.insert(JSON_SHOPCODE, m_storeId);
#endif
return rObj;
}
......
......@@ -27,7 +27,7 @@ void AlertForm::SetContent(AlertForm::Type type, const QString &msg)
ui->alertLabIng->hide();
ui->alertLabError->hide();
break;
case ERROR:
case MSGERROR:
ui->alertBtnOk->show();
ui->alertLabOk->hide();
ui->alertLabIng->hide();
......
......@@ -21,7 +21,7 @@ public:
typedef enum
{
SUCCESS=0,
ERROR,
MSGERROR,
LOADING
}Type;
......
......@@ -385,27 +385,25 @@ void MainForm::onChangeOrderStatus(OrderObject *orderObject, int oldStatus)
table->setItem(0, 5, item5); // 下单时间
if(table != ui->mainTableFinsh && table != ui->mainTableOther)
{
QWidget *pWdg = new QWidget(table);
QHBoxLayout *hLayout = new QHBoxLayout(pWdg);
QPushButton * pBtn = new QPushButton(pWdg);
pBtn->setFixedSize(70, 30);
pBtn->setFocusPolicy(Qt::NoFocus);
pBtn->setObjectName("mainProcBtn");
pBtn->setProperty("orderId", orderObject->order_id);
pBtn->setProperty("operation", table->property("operation").toString());
pBtn->setText(table->property("operationName").toString());
hLayout->addWidget(pBtn);
hLayout->setMargin(0);
pWdg->setLayout(hLayout);
#ifdef TODO
if(!table->property("operationName").toString().compare("接单"))
{
QWidget *pWdg = new QWidget(table);
QHBoxLayout *hLayout = new QHBoxLayout(pWdg);
QPushButton * pBtn = new QPushButton(pWdg);
pBtn->setFixedSize(70, 30);
pBtn->setFocusPolicy(Qt::NoFocus);
pBtn->setObjectName("mainProcBtn");
pBtn->setProperty("orderId", orderObject->order_id);
pBtn->setProperty("operation", table->property("operation").toString());
pBtn->setText(table->property("operationName").toString());
hLayout->addWidget(pBtn);
hLayout->setMargin(0);
pWdg->setLayout(hLayout);
table->setCellWidget(0, 6, pWdg); // 操作按钮
connect(pBtn, &QPushButton::clicked, this, &MainForm::onMainProcBtnClicked);
}
#else
table->setCellWidget(0, 6, pWdg);
#endif
connect(pBtn, &QPushButton::clicked, this, &MainForm::onMainProcBtnClicked);
}
QString btnText = QString("%1\n%2").arg(table->rowCount()).arg(tabBtn->property("name").toString());
......
......@@ -22,6 +22,7 @@
#define INI_LOGINSERVER "FmServer/loginUrl"
#define INI_ORDERSERVER "FmServer/orderUrl"
#define INI_PRINTERNAME "Printer/name"
#define INI_OMSBTNPOSTION "OmsBtn/postion"
#define INI_FLOATPOSTION "Float/postion"
#define INI_FLOATOPACITY "Float/opacity"
#define INI_BLINKINTERVAL "Float/blinkInterval"
......
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