Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
takeout_sbk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yunpeng.song
takeout_sbk
Commits
847f9da6
Commit
847f9da6
authored
Jan 23, 2019
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、补录异常订单--功能按钮
2、同步服务端全部订单--功能按钮 3、走心跳接口回传插件版本号+版本备注
parent
f324f0d6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
106 additions
and
10 deletions
+106
-10
fmTakeout/Control/flowControl.cpp
+0
-0
fmTakeout/Control/flowControl.h
+28
-0
fmTakeout/DTools/dataManger.cpp
+3
-2
fmTakeout/DTools/dataManger.h
+1
-1
fmTakeout/Model/orderObject.cpp
+1
-1
fmTakeout/alertForm.cpp
+8
-0
fmTakeout/alertForm.h
+2
-1
fmTakeout/detailForm.cpp
+19
-0
fmTakeout/detailForm.h
+21
-0
fmTakeout/mainForm.cpp
+6
-2
fmTakeout/mainForm.h
+11
-0
fmTakeout/mainForm.ui
+3
-3
fmTakeout/preDefine.h
+3
-0
No files found.
fmTakeout/Control/flowControl.cpp
View file @
847f9da6
This diff is collapsed.
Click to expand it.
fmTakeout/Control/flowControl.h
View file @
847f9da6
...
...
@@ -86,6 +86,7 @@ private:
// 门店信息
QString
m_storeId
;
QString
m_password
;
QString
m_puginVersionComments
;
QString
m_posId
;
QString
m_cashierId
;
QString
m_cashierName
;
...
...
@@ -155,6 +156,7 @@ signals:
* 返回:NULL
* */
void
hideAlert
();
/* 功能:显示通知窗口
* 参数:[1]窗口类型[2]显示信息
* 返回:NULL
...
...
@@ -381,19 +383,43 @@ public slots:
* 返回:NULL
* */
void
onSerachOrder
(
const
QString
&
text
);
/* 功能:拒绝订单;
* 参数:[1]订单号 [] [] [] []
* 返回:NULL
* */
void
onProcessRejectOrder
(
const
QString
&
orderId
,
const
int
&
reasonCode
,
const
QString
&
reason
);
/* 功能:作废订单;
* 参数:[1]订单号 [] [] [] []
* 返回:NULL
* */
void
onProcessRepealOrder
(
const
QString
&
orderId
,
const
int
&
reasonCode
,
const
QString
&
reason
,
const
QString
&
dishesListString
);
/* 功能:重新向POS录入外卖订单;
* 参数:[1]订单号
* 返回:NULL
* */
void
onProcessReTryInputOrder
(
const
QString
&
orderId
);
/* 功能:获取门店营业状态
* 参数:NULL
* 返回:NULL
* */
void
onGetBusinessStatus
();
/* 功能:获取OMS服务端全部订单
* 参数:NULL
* 返回:NULL
* */
void
onGetOMSAllOrders
();
/* 功能:获取菜品信息
* 参数:NULL
* 返回:NULL
* */
void
onPullDishes
();
/* 功能:获取菜品信息
* 参数:NULL
* 返回:NULL
...
...
@@ -405,11 +431,13 @@ public slots:
* 返回:NULL
* */
void
onUpdDishesForRef
(
QString
channelCode
,
QMap
<
QString
,
int
>
dishes
);
/* 功能:设置门店营业状态
* 参数:NULL
* 返回:NULL
* */
void
onSetStoreOperatingStatus
(
const
QString
&
channelCode
,
const
QString
&
channelName
,
int
business_status
);
/* 功能:向服务端获取日结数据
* 参数:NULL
* 返回:NULL
...
...
fmTakeout/DTools/dataManger.cpp
View file @
847f9da6
...
...
@@ -57,7 +57,7 @@ QJsonObject DataManger::GetLoginData(const QString &partnerId, const QString &st
}
QJsonObject
DataManger
::
GetHeartData
(
const
QString
&
password
,
const
QString
&
stationId
,
const
QString
&
ipAddress
)
const
QString
&
stationId
,
const
QString
&
ipAddress
,
const
QString
&
versionComments
)
{
QJsonObject
rObj
;
rObj
.
insert
(
JSON_IPADDRESS
,
ipAddress
);
...
...
@@ -65,7 +65,8 @@ QJsonObject DataManger::GetHeartData(const QString &password,
rObj
.
insert
(
JSON_ORGCODE
,
m_storeId
);
rObj
.
insert
(
JSON_PASSWORD
,
password
);
rObj
.
insert
(
JSON_MACHINECODE
,
stationId
);
//rObj.insert(JSON_USERID, cashierId);
rObj
.
insert
(
JSON_PLUGINVERSION
,
APP_VERSION
);
rObj
.
insert
(
JSON_PLUGINVERSIONCOMMENTS
,
versionComments
);
return
rObj
;
}
...
...
fmTakeout/DTools/dataManger.h
View file @
847f9da6
...
...
@@ -43,7 +43,7 @@ public:
* 返回:登录数据
* */
QJsonObject
GetHeartData
(
const
QString
&
password
,
const
QString
&
stationId
,
const
QString
&
ipAddress
);
const
QString
&
stationId
,
const
QString
&
ipAddress
,
const
QString
&
versionComments
);
/* 功能:获取拉取订单数据
* 参数:[1]时间戳
* 返回:登录数据
...
...
fmTakeout/Model/orderObject.cpp
View file @
847f9da6
...
...
@@ -95,7 +95,7 @@ QString OrderObject::getOrderStatusDec()
case
4
:
return
QString
::
fromLocal8Bit
(
"配送中"
);
case
5
:
return
QString
::
fromLocal8Bit
(
"完成"
);
case
6
:
return
QString
::
fromLocal8Bit
(
"取消"
);
de
af
ult
:
return
QString
::
fromLocal8Bit
(
"未知"
);
de
fa
ult
:
return
QString
::
fromLocal8Bit
(
"未知"
);
}
return
QString
::
fromLocal8Bit
(
"未知"
);
}
fmTakeout/alertForm.cpp
View file @
847f9da6
...
...
@@ -39,6 +39,14 @@ void AlertForm::SetContent(AlertForm::Type type, const QString &msg)
ui
->
alertLabIng
->
show
();
ui
->
alertLabError
->
hide
();
break
;
case
SYNCDATA
:
ui
->
alertBtnOk
->
hide
();
ui
->
alertLabOk
->
hide
();
ui
->
alertLabIng
->
show
();
ui
->
alertLabError
->
hide
();
m_timer
->
stop
();
m_timer
->
start
(
20000
);
break
;
}
ui
->
alertLabMsg
->
setText
(
msg
);
if
(
!
m_timer
->
isActive
())
...
...
fmTakeout/alertForm.h
View file @
847f9da6
...
...
@@ -22,7 +22,8 @@ public:
{
SUCCESS
=
0
,
MSGERROR
,
LOADING
LOADING
,
SYNCDATA
}
Type
;
/* 功能:设置显示内容
...
...
fmTakeout/detailForm.cpp
View file @
847f9da6
...
...
@@ -14,6 +14,8 @@ DetailForm::DetailForm(QWidget *parent) :
connect
(
this
,
&
DetailForm
::
processOrder
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onProcessOrder
);
connect
(
this
,
&
DetailForm
::
processRejectOrder
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onProcessRejectOrder
);
connect
(
this
,
&
DetailForm
::
processRepealOrder
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onProcessRepealOrder
);
connect
(
this
,
&
DetailForm
::
processReTryInputOrder
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onProcessReTryInputOrder
);
m_rejectForm
=
NULL
;
m_refuseForm
=
NULL
;
_Init
();
...
...
@@ -207,6 +209,11 @@ void DetailForm::InitData(OrderObject *orderObject)
ui
->
detailBtn2
->
hide
();
}
//订单入机失败 [销售单 / 退货单] 需要显示 重新录单 按钮 方便店员再次触发录单;
if
(
OrderObject
::
SimExceptSale
==
orderObject
->
orderStatus
||
OrderObject
::
SimExceptRefund
==
orderObject
->
orderStatus
)
{
ui
->
detailBtn0
->
show
();
}
ui
->
detailBtn3
->
setText
(
GetOperNameByStatus
(
orderObject
->
orderStatus
));
ui
->
detailBtn3
->
setProperty
(
"operation"
,
GetOperByStatus
(
orderObject
->
orderStatus
));
ui
->
detailBtn3
->
setProperty
(
"orderId"
,
orderObject
->
id
);
...
...
@@ -289,3 +296,15 @@ void DetailForm::onOperaBtnClicked()
void
DetailForm
::
on_detailBtn1_clicked
()
{
}
void
DetailForm
::
on_detailBtn0_clicked
()
{
QLOG_INFO
()
<<
QString
(
"[<<<<---DetailForm::on_detailBtn0_clicked: begin:--->>>>]"
)
<<
QString
(
"重新录单"
)
<<
m_orderObject
->
id
;
if
(
m_orderObject
)
{
emit
processReTryInputOrder
(
m_orderObject
->
id
);
this
->
close
();
//this->destroy();
}
else
{
QLOG_ERROR
()
<<
QString
(
"[<<<<---DetailForm::on_detailBtn0_clicked: m_orderObject point is NULL--->>>>]"
);
}
}
fmTakeout/detailForm.h
View file @
847f9da6
...
...
@@ -47,19 +47,40 @@ signals:
* */
void
processOrder
(
const
QString
&
operation
,
const
QString
&
orderId
);
void
processRejectOrder
(
const
QString
&
orderId
,
const
int
&
reasonCode
,
const
QString
&
reason
);
/* 功能:作废订单
* 参数:[1]订单编号 [2]作废原因码 [3]作废原因 [4]商品列表
* 返回:NULL
* */
void
processRepealOrder
(
const
QString
&
orderId
,
const
int
&
reasonCode
,
const
QString
&
reason
,
const
QString
&
dishesList
);
/* 功能:重新尝试录入订单
* 参数:[1]订单编号
* 返回:NULL
* */
void
processReTryInputOrder
(
const
QString
&
orderId
);
private
slots
:
/* 功能:处理订单按钮点击
* 参数:NULL
* 返回:NULL
* */
void
onOperaBtnClicked
();
/* 功能:处理重新打印按钮点击
* 参数:NULL
* 返回:NULL
* */
void
on_detailBtn1_clicked
();
/* 功能:处理点击 重新录单按钮
* 参数:NULL
* 返回:NULL
* */
void
on_detailBtn0_clicked
();
};
#endif // DETAILFORM_H
fmTakeout/mainForm.cpp
View file @
847f9da6
...
...
@@ -44,6 +44,7 @@ MainForm::MainForm(QWidget *parent) :
connect
(
this
,
&
MainForm
::
getOrderDetails
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onGetOrderDetails
);
connect
(
this
,
&
MainForm
::
PullDishes
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onPullDishes
);
connect
(
this
,
&
MainForm
::
GetBusinessStatus
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onGetBusinessStatus
);
connect
(
this
,
&
MainForm
::
GetOMSAllOrders
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onGetOMSAllOrders
);
connect
(
this
,
&
MainForm
::
getDayReport
,
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
onDailyReport
);
connect
(
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
showDailyReportData
,
this
,
&
MainForm
::
onSetDailyReportData
);
connect
(
&
FlowControl
::
GetInstance
(),
&
FlowControl
::
hideAlert
,
this
,
&
MainForm
::
onHideAlert
);
...
...
@@ -109,7 +110,9 @@ void MainForm::MyShow()
m_dailyReportForm
=
new
DailyReportForm
(
this
);
ui
->
mainBtnDayReport
->
hide
();
ui
->
mainBtnStoreManager
->
hide
();
//ui->mainBtnStoreManager->hide();
//变更此按钮为 同步订单;
ui
->
mainBtnStoreManager
->
show
();
#ifdef TODO
ui
->
mainBtnDishManager
->
hide
();
#endif
...
...
@@ -659,7 +662,8 @@ void MainForm::on_mainBtnDishManager_clicked()
void
MainForm
::
on_mainBtnStoreManager_clicked
()
{
emit
GetBusinessStatus
();
//emit GetBusinessStatus();
emit
GetOMSAllOrders
();
}
void
MainForm
::
on_mainBtnDayReport_clicked
()
...
...
fmTakeout/mainForm.h
View file @
847f9da6
...
...
@@ -95,6 +95,7 @@ signals:
* 返回:NULL
* */
void
processOrder
(
const
QString
&
operation
,
const
QString
&
orderId
);
/* 功能:通知悬浮窗显示
* 参数:NULL
* 返回:NULL
...
...
@@ -106,21 +107,25 @@ signals:
* 返回:NULL
* */
void
startRemind
(
int
type
);
/* 功能:通知悬浮窗停止提示
* 参数:NULL
* 返回:NULL
* */
void
stopRemind
();
/* 功能:获取订单详情
* 参数:NULL
* 返回:NULL
* */
void
getOrderDetails
(
const
QString
&
orderId
);
/* 功能:开启流程
* 参数:NULL
* 返回:NULL
* */
void
flowStart
();
/* 功能:获取菜品信息
* 参数:NULL
* 返回:NULL
...
...
@@ -132,12 +137,18 @@ signals:
* 返回:NULL
* */
void
GetBusinessStatus
();
/* 功能:获取日结数据
* 参数:NULL
* 返回:NULL
* */
void
getDayReport
();
/* 功能:同步服务端全部订单;
* 参数:NULL
* 返回:NULL
* */
void
GetOMSAllOrders
();
private
slots
:
...
...
fmTakeout/mainForm.ui
View file @
847f9da6
...
...
@@ -500,13 +500,13 @@
<widget class="QPushButton" name="mainBtnStoreManager">
<property name="minimumSize">
<size>
<width>
5
0</width>
<width>
6
0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>
5
0</width>
<width>
6
0</width>
<height>30</height>
</size>
</property>
...
...
@@ -514,7 +514,7 @@
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>
门店管理
</string>
<string>
同步订单
</string>
</property>
</widget>
</item>
...
...
fmTakeout/preDefine.h
View file @
847f9da6
...
...
@@ -64,6 +64,7 @@
#define JSON_PASSWORD "password"
#define JSON_IPADDRESS "iPAddress"
#define JSON_MACHINECODE "machineCode"
#define JSON_PARTNERID "partnerId"
#define JSON_ORGCODE "orgCode"
#define JSON_POSNO "posNo"
...
...
@@ -86,6 +87,8 @@
#define JSON_TOKEN "PosToken"
#define JSON_DATA "data"
#define JSON_POSVERSION "pos_version"
#define JSON_PLUGINVERSION "version"
#define JSON_PLUGINVERSIONCOMMENTS "versionComments"
#define JSON_ORDERS "orders"
#define JSON_COUNT "count"
#define JSON_PRODUCTS "products"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment