Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmTakeaway
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
shangshang.dai
FmTakeaway
Commits
a0c954fa
Commit
a0c954fa
authored
Oct 18, 2016
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取管理员权限,拒单窗口的字体大小调整
parent
1cb1995b
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
226 additions
and
53 deletions
+226
-53
fmTakeaway/Control/flowControl.cpp
+56
-19
fmTakeaway/Control/flowControl.h
+2
-2
fmTakeaway/Control/sinfoControl.cpp
+7
-1
fmTakeaway/Control/sinfoControl.h
+1
-0
fmTakeaway/RejectForm.cpp
+6
-1
fmTakeaway/RejectForm.h
+1
-0
fmTakeaway/RejectForm.ui
+112
-5
fmTakeaway/detailForm.cpp
+12
-1
fmTakeaway/detailForm.h
+1
-1
fmTakeaway/detailForm.ui
+3
-0
fmTakeaway/floatForm.cpp
+3
-5
fmTakeaway/floatForm.h
+2
-4
fmTakeaway/fmTakeaway.pro
+3
-2
fmTakeaway/main.cpp
+8
-7
fmTakeaway/mainForm.cpp
+0
-2
run/skin/deaufult.qss
+9
-3
run/skin/deaufult.rcc
+0
-0
No files found.
fmTakeaway/Control/flowControl.cpp
View file @
a0c954fa
...
@@ -176,6 +176,20 @@ bool FlowControl::_PullOrder()
...
@@ -176,6 +176,20 @@ bool FlowControl::_PullOrder()
{
{
QLOG_INFO
()
<<
QString
(
"print failed"
);
QLOG_INFO
()
<<
QString
(
"print failed"
);
}
}
//写入销售单
QLOG_INFO
()
<<
QString
(
"[---begin entry order [%1]---]."
).
arg
(
QString
(
FmPlugin
::
GetInstance
().
_GetOrderEntryData
(
orderObject
)));
if
(
!
FmPlugin
::
GetInstance
().
DoOrderEntry
(
orderObject
,
error
))
{
//while(!FmPlugin::GetInstance().DoOrderEntry(orderObject, error, true))
//{
QLOG_INFO
()
<<
QString
(
"entry order failed[%1]"
).
arg
(
error
);
//}
}
else
{
QLOG_INFO
()
<<
QString
(
"[entry order success]."
);
}
}
}
}
}
...
@@ -261,20 +275,6 @@ bool FlowControl::_ConfirmOrder(const QString &orderId, const DeliverObject &del
...
@@ -261,20 +275,6 @@ bool FlowControl::_ConfirmOrder(const QString &orderId, const DeliverObject &del
}
else
}
else
{
{
OrderObject
*
orderObject
=
m_ordersMap
.
value
(
orderId
);
OrderObject
*
orderObject
=
m_ordersMap
.
value
(
orderId
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在写入销售单......"
);
//写入销售单
QLOG_INFO
()
<<
QString
(
"[---begin entry order [%1]---]."
).
arg
(
QString
(
FmPlugin
::
GetInstance
().
_GetOrderEntryData
(
orderObject
)));
if
(
!
FmPlugin
::
GetInstance
().
DoOrderEntry
(
orderObject
,
error
))
{
while
(
!
FmPlugin
::
GetInstance
().
DoOrderEntry
(
orderObject
,
error
,
true
))
{
QLOG_INFO
()
<<
QString
(
"entry order failed[%1]"
).
arg
(
error
);
}
}
QLOG_INFO
()
<<
QString
(
"[entry order success]."
);
QString
remark
(
orderObject
->
remark
),
deliveryTime
;
QString
remark
(
orderObject
->
remark
),
deliveryTime
;
remark
=
remark
.
isEmpty
()
?
""
:
QString
(
"
\r\n
[备注: %1]"
).
arg
(
remark
);
remark
=
remark
.
isEmpty
()
?
""
:
QString
(
"
\r\n
[备注: %1]"
).
arg
(
remark
);
deliveryTime
=
QString
(
"
\r\n
[期望送达时间: %1]"
).
arg
(
QDateTime
::
fromTime_t
(
orderObject
->
delivery_time
).
toString
(
"MM/dd hh:mm"
));
deliveryTime
=
QString
(
"
\r\n
[期望送达时间: %1]"
).
arg
(
QDateTime
::
fromTime_t
(
orderObject
->
delivery_time
).
toString
(
"MM/dd hh:mm"
));
...
@@ -334,6 +334,11 @@ bool FlowControl::_RefuseOrder(const QString &orderId, int refuseCode)
...
@@ -334,6 +334,11 @@ bool FlowControl::_RefuseOrder(const QString &orderId, int refuseCode)
bool
FlowControl
::
_SendOrder
(
const
QString
&
orderId
)
bool
FlowControl
::
_SendOrder
(
const
QString
&
orderId
)
{
{
if
(
m_ordersMap
.
value
(
orderId
)
->
courier_name
.
isEmpty
())
{
emit
showAlert
(
AlertForm
::
ERROR
,
QString
(
"配送员暂未接单,请等待"
));
return
true
;
}
QString
error
;
QString
error
;
bool
result
;
bool
result
;
QJsonObject
sendJson
;
QJsonObject
sendJson
;
...
@@ -453,14 +458,14 @@ bool FlowControl::_RefuseRefund(const QString& orderId)
...
@@ -453,14 +458,14 @@ bool FlowControl::_RefuseRefund(const QString& orderId)
return
result
;
return
result
;
}
}
bool
FlowControl
::
_RefundOrder
(
const
QString
&
orderId
)
bool
FlowControl
::
_RefundOrder
(
const
QString
&
orderId
,
QString
reason
)
{
{
QString
error
;
QString
error
;
bool
result
;
bool
result
;
QJsonObject
sendJson
;
QJsonObject
sendJson
;
QJsonObject
recvJson
;
QJsonObject
recvJson
;
sendJson
=
DataManger
::
GetInstance
().
GetRefundOrderData
(
"1"
,
orderId
);
sendJson
=
DataManger
::
GetInstance
().
GetRefundOrderData
(
reason
,
orderId
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在通信......"
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在通信......"
);
...
@@ -487,8 +492,10 @@ bool FlowControl::_RefundOrder(const QString &orderId)
...
@@ -487,8 +492,10 @@ bool FlowControl::_RefundOrder(const QString &orderId)
//orderObject->status_desc = recvJson[JSON_STATUSDESC].toString();
//orderObject->status_desc = recvJson[JSON_STATUSDESC].toString();
emit
changeOrderStatus
(
orderObject
,
oldStatus
);
emit
changeOrderStatus
(
orderObject
,
oldStatus
);
QString
tmpstr
;
QString
tmpstr
=
""
;
// 撤回销售单
// 撤回销售单
if
(
!
m_ordersMap
.
value
(
orderId
)
->
courier_name
.
isEmpty
())
{
QLOG_INFO
()
<<
QString
(
"[---begin refund order---]."
);
QLOG_INFO
()
<<
QString
(
"[---begin refund order---]."
);
if
(
!
FmPlugin
::
GetInstance
().
RefundOrder
(
orderId
,
error
))
if
(
!
FmPlugin
::
GetInstance
().
RefundOrder
(
orderId
,
error
))
{
{
...
@@ -498,6 +505,7 @@ bool FlowControl::_RefundOrder(const QString &orderId)
...
@@ -498,6 +505,7 @@ bool FlowControl::_RefundOrder(const QString &orderId)
{
{
tmpstr
=
QString
(
"
\r\n
[撤回销售单成功]"
);
tmpstr
=
QString
(
"
\r\n
[撤回销售单成功]"
);
}
}
}
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
(
"退单成功!%1"
).
arg
(
tmpstr
));
emit
showAlert
(
AlertForm
::
SUCCESS
,
QString
(
"退单成功!%1"
).
arg
(
tmpstr
));
}
}
...
@@ -536,7 +544,7 @@ void FlowControl::onProcessOrder(const QString &operation, const QString &orderI
...
@@ -536,7 +544,7 @@ void FlowControl::onProcessOrder(const QString &operation, const QString &orderI
_RefuseRefund
(
orderId
);
_RefuseRefund
(
orderId
);
}
else
if
(
!
operation
.
compare
(
OPERATION_REFUNDORDER
))
}
else
if
(
!
operation
.
compare
(
OPERATION_REFUNDORDER
))
{
{
_RefundOrder
(
orderId
);
_RefundOrder
(
orderId
,
"同意退款"
);
}
}
}
}
...
@@ -575,9 +583,38 @@ void FlowControl::onSerachOrder(const QString &text)
...
@@ -575,9 +583,38 @@ void FlowControl::onSerachOrder(const QString &text)
emit
showSearchOrderResult
(
orderMap
);
emit
showSearchOrderResult
(
orderMap
);
}
}
void
FlowControl
::
onProcessRejectOrder
(
const
QString
&
orderId
,
const
int
&
reason
)
void
FlowControl
::
onProcessRejectOrder
(
const
QString
&
orderId
,
const
int
&
reason
,
const
int
&
reasontype
)
{
{
if
(
reasontype
==
0
)
{
_RefuseOrder
(
orderId
,
reason
);
_RefuseOrder
(
orderId
,
reason
);
}
else
{
switch
(
reason
)
{
case
1
:
_RefundOrder
(
orderId
,
"不在配送范围"
);
break
;
case
2
:
_RefundOrder
(
orderId
,
"餐厅已打烊"
);
break
;
case
3
:
_RefundOrder
(
orderId
,
"已售完"
);
break
;
case
4
:
_RefundOrder
(
orderId
,
"菜品价格发生变化"
);
break
;
case
6
:
_RefundOrder
(
orderId
,
"联系不上用户"
);
break
;
case
5
:
_RefundOrder
(
orderId
,
"餐厅太忙"
);
break
;
default
:
break
;
}
}
}
}
fmTakeaway/Control/flowControl.h
View file @
a0c954fa
...
@@ -138,7 +138,7 @@ private slots:
...
@@ -138,7 +138,7 @@ private slots:
* 参数:NULL
* 参数:NULL
* 返回:是否成功
* 返回:是否成功
* */
* */
bool
_RefundOrder
(
const
QString
&
orderId
);
bool
_RefundOrder
(
const
QString
&
orderId
,
QString
reason
);
/* 功能:获取Json对象的字符
/* 功能:获取Json对象的字符
* 参数:NULL
* 参数:NULL
* 返回:Json字符串
* 返回:Json字符串
...
@@ -168,7 +168,7 @@ public slots:
...
@@ -168,7 +168,7 @@ public slots:
* 返回:NULL
* 返回:NULL
* */
* */
void
onSerachOrder
(
const
QString
&
text
);
void
onSerachOrder
(
const
QString
&
text
);
void
onProcessRejectOrder
(
const
QString
&
orderId
,
const
int
&
reason
);
void
onProcessRejectOrder
(
const
QString
&
orderId
,
const
int
&
reason
,
const
int
&
reasontype
);
};
};
#endif // FLOWCONTROL_H
#endif // FLOWCONTROL_H
fmTakeaway/Control/sinfoControl.cpp
View file @
a0c954fa
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
#include "QsLog.h"
#include "QsLog.h"
#include <QJsonObject>
#include <QJsonObject>
#include <QJsonDocument>
#include <QJsonDocument>
#include <QDebug>
SInfoControl
&
SInfoControl
::
GetInstance
()
SInfoControl
&
SInfoControl
::
GetInstance
()
{
{
...
@@ -24,7 +25,6 @@ void SInfoControl::run()
...
@@ -24,7 +25,6 @@ void SInfoControl::run()
{
{
m_mutex
.
lock
();
m_mutex
.
lock
();
m_tcpServer
=
new
QTcpServer
(
this
);
m_tcpServer
=
new
QTcpServer
(
this
);
if
(
!
m_tcpServer
->
listen
(
QHostAddress
::
LocalHost
,
m_port
))
if
(
!
m_tcpServer
->
listen
(
QHostAddress
::
LocalHost
,
m_port
))
{
{
emit
listenFailed
(
QString
(
"绑定端口[%1]失败!"
).
arg
(
m_port
));
emit
listenFailed
(
QString
(
"绑定端口[%1]失败!"
).
arg
(
m_port
));
...
@@ -109,3 +109,9 @@ void SInfoControl::run()
...
@@ -109,3 +109,9 @@ void SInfoControl::run()
QLOG_INFO
()
<<
"refundControl exit."
;
QLOG_INFO
()
<<
"refundControl exit."
;
m_mutex
.
unlock
();
m_mutex
.
unlock
();
}
}
void
SInfoControl
::
doclosePort
()
{
m_tcpServer
->
close
();
qDebug
()
<<
"-------guanbi--------"
;
}
fmTakeaway/Control/sinfoControl.h
View file @
a0c954fa
...
@@ -33,6 +33,7 @@ public slots:
...
@@ -33,6 +33,7 @@ public slots:
* 返回:NULL
* 返回:NULL
* */
* */
void
run
();
void
run
();
void
doclosePort
();
signals
:
signals
:
/* 功能:通知主界面监听失败
/* 功能:通知主界面监听失败
...
...
fmTakeaway/RejectForm.cpp
View file @
a0c954fa
...
@@ -53,10 +53,15 @@ void RejectForm::on_rejectRbtn2_toggled(bool)
...
@@ -53,10 +53,15 @@ void RejectForm::on_rejectRbtn2_toggled(bool)
void
RejectForm
::
on_rejectRbtn3_toggled
(
bool
)
void
RejectForm
::
on_rejectRbtn3_toggled
(
bool
)
{
{
m_rejectReason
=
8
;
m_rejectReason
=
5
;
}
}
void
RejectForm
::
on_rejectRbtn4_toggled
(
bool
)
void
RejectForm
::
on_rejectRbtn4_toggled
(
bool
)
{
{
m_rejectReason
=
6
;
m_rejectReason
=
6
;
}
}
void
RejectForm
::
on_rejectRbtn5_toggled
(
bool
)
{
m_rejectReason
=
4
;
}
fmTakeaway/RejectForm.h
View file @
a0c954fa
...
@@ -29,6 +29,7 @@ private slots:
...
@@ -29,6 +29,7 @@ private slots:
void
on_rejectRbtn2_toggled
(
bool
);
void
on_rejectRbtn2_toggled
(
bool
);
void
on_rejectRbtn3_toggled
(
bool
);
void
on_rejectRbtn3_toggled
(
bool
);
void
on_rejectRbtn4_toggled
(
bool
);
void
on_rejectRbtn4_toggled
(
bool
);
void
on_rejectRbtn5_toggled
(
bool
);
};
};
#endif // REJECTFORM_H
#endif // REJECTFORM_H
fmTakeaway/RejectForm.ui
View file @
a0c954fa
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
<rect>
<rect>
<x>
0
</x>
<x>
0
</x>
<y>
0
</y>
<y>
0
</y>
<width>
2
26
</width>
<width>
2
99
</width>
<height>
267
</height>
<height>
351
</height>
</rect>
</rect>
</property>
</property>
<property
name=
"windowTitle"
>
<property
name=
"windowTitle"
>
...
@@ -46,6 +46,13 @@
...
@@ -46,6 +46,13 @@
<height>
34
</height>
<height>
34
</height>
</size>
</size>
</property>
</property>
<property
name=
"font"
>
<font>
<family>
宋体
</family>
<pointsize>
12
</pointsize>
<italic>
false
</italic>
</font>
</property>
<property
name=
"styleSheet"
>
<property
name=
"styleSheet"
>
<string
notr=
"true"
/>
<string
notr=
"true"
/>
</property>
</property>
...
@@ -76,10 +83,31 @@
...
@@ -76,10 +83,31 @@
<number>
10
</number>
<number>
10
</number>
</property>
</property>
<property
name=
"leftMargin"
>
<property
name=
"leftMargin"
>
<number>
4
0
</number>
<number>
4
8
</number>
</property>
</property>
<item>
<item>
<widget
class=
"QRadioButton"
name=
"rejectRbtn0"
>
<widget
class=
"QRadioButton"
name=
"rejectRbtn0"
>
<property
name=
"enabled"
>
<bool>
true
</bool>
</property>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Minimum"
vsizetype=
"Minimum"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"font"
>
<font>
<family>
Arial
</family>
<pointsize>
14
</pointsize>
</font>
</property>
<property
name=
"focusPolicy"
>
<property
name=
"focusPolicy"
>
<enum>
Qt::NoFocus
</enum>
<enum>
Qt::NoFocus
</enum>
</property>
</property>
...
@@ -93,6 +121,18 @@
...
@@ -93,6 +121,18 @@
</item>
</item>
<item>
<item>
<widget
class=
"QRadioButton"
name=
"rejectRbtn1"
>
<widget
class=
"QRadioButton"
name=
"rejectRbtn1"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"font"
>
<font>
<family>
Arial
</family>
<pointsize>
14
</pointsize>
</font>
</property>
<property
name=
"focusPolicy"
>
<property
name=
"focusPolicy"
>
<enum>
Qt::NoFocus
</enum>
<enum>
Qt::NoFocus
</enum>
</property>
</property>
...
@@ -106,6 +146,18 @@
...
@@ -106,6 +146,18 @@
</item>
</item>
<item>
<item>
<widget
class=
"QRadioButton"
name=
"rejectRbtn2"
>
<widget
class=
"QRadioButton"
name=
"rejectRbtn2"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"font"
>
<font>
<family>
Arial
</family>
<pointsize>
14
</pointsize>
</font>
</property>
<property
name=
"focusPolicy"
>
<property
name=
"focusPolicy"
>
<enum>
Qt::NoFocus
</enum>
<enum>
Qt::NoFocus
</enum>
</property>
</property>
...
@@ -119,18 +171,61 @@
...
@@ -119,18 +171,61 @@
</item>
</item>
<item>
<item>
<widget
class=
"QRadioButton"
name=
"rejectRbtn4"
>
<widget
class=
"QRadioButton"
name=
"rejectRbtn4"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"font"
>
<font>
<family>
Arial
</family>
<pointsize>
14
</pointsize>
</font>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
联系不上客户
</string>
<string>
联系不上客户
</string>
</property>
</property>
</widget>
</widget>
</item>
</item>
<item>
<item>
<widget
class=
"QRadioButton"
name=
"rejectRbtn5"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"font"
>
<font>
<family>
Arial
</family>
<pointsize>
14
</pointsize>
</font>
</property>
<property
name=
"text"
>
<string>
菜品价格发生变动
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QRadioButton"
name=
"rejectRbtn3"
>
<widget
class=
"QRadioButton"
name=
"rejectRbtn3"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"font"
>
<font>
<family>
Arial
</family>
<pointsize>
14
</pointsize>
</font>
</property>
<property
name=
"focusPolicy"
>
<property
name=
"focusPolicy"
>
<enum>
Qt::NoFocus
</enum>
<enum>
Qt::NoFocus
</enum>
</property>
</property>
<property
name=
"text"
>
<property
name=
"text"
>
<string>
无人配送
</string>
<string>
餐厅太忙
</string>
</property>
</property>
<property
name=
"reasonCode"
stdset=
"0"
>
<property
name=
"reasonCode"
stdset=
"0"
>
<number>
2
</number>
<number>
2
</number>
...
@@ -171,6 +266,12 @@
...
@@ -171,6 +266,12 @@
<height>
40
</height>
<height>
40
</height>
</size>
</size>
</property>
</property>
<property
name=
"font"
>
<font>
<family>
Arial
</family>
<pointsize>
12
</pointsize>
</font>
</property>
<property
name=
"focusPolicy"
>
<property
name=
"focusPolicy"
>
<enum>
Qt::NoFocus
</enum>
<enum>
Qt::NoFocus
</enum>
</property>
</property>
...
@@ -193,6 +294,12 @@
...
@@ -193,6 +294,12 @@
<height>
40
</height>
<height>
40
</height>
</size>
</size>
</property>
</property>
<property
name=
"font"
>
<font>
<family>
Arial
</family>
<pointsize>
12
</pointsize>
</font>
</property>
<property
name=
"focusPolicy"
>
<property
name=
"focusPolicy"
>
<enum>
Qt::NoFocus
</enum>
<enum>
Qt::NoFocus
</enum>
</property>
</property>
...
@@ -211,7 +318,7 @@
...
@@ -211,7 +318,7 @@
<property
name=
"sizeHint"
stdset=
"0"
>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<size>
<width>
20
</width>
<width>
20
</width>
<height>
4
0
</height>
<height>
2
0
</height>
</size>
</size>
</property>
</property>
</spacer>
</spacer>
...
...
fmTakeaway/detailForm.cpp
View file @
a0c954fa
...
@@ -112,7 +112,15 @@ void DetailForm::onOperaBtnClicked()
...
@@ -112,7 +112,15 @@ void DetailForm::onOperaBtnClicked()
m_rejectForm
->
show
();
m_rejectForm
->
show
();
if
(
m_rejectForm
->
exec
()
==
QDialog
::
Accepted
)
if
(
m_rejectForm
->
exec
()
==
QDialog
::
Accepted
)
{
{
emit
processRejectOrder
(
pBtn
->
property
(
"orderId"
).
toString
(),
m_rejectForm
->
GetReasonCode
());
emit
processRejectOrder
(
pBtn
->
property
(
"orderId"
).
toString
(),
m_rejectForm
->
GetReasonCode
(),
0
);
}
}
else
if
(
pBtn
->
text
()
==
"退单"
)
{
m_rejectForm
->
show
();
if
(
m_rejectForm
->
exec
()
==
QDialog
::
Accepted
)
{
emit
processRejectOrder
(
pBtn
->
property
(
"orderId"
).
toString
(),
m_rejectForm
->
GetReasonCode
(),
1
);
}
}
}
}
else
else
...
@@ -123,5 +131,8 @@ void DetailForm::onOperaBtnClicked()
...
@@ -123,5 +131,8 @@ void DetailForm::onOperaBtnClicked()
void
DetailForm
::
on_detailBtn1_clicked
()
void
DetailForm
::
on_detailBtn1_clicked
()
{
{
if
(
!
m_orderObject
->
courier_name
.
isEmpty
())
{
FmPrinter
::
GetInstance
().
DoPrint
(
ConfigManger
::
GetInstance
().
GetPrinterName
(),
m_orderObject
);
FmPrinter
::
GetInstance
().
DoPrint
(
ConfigManger
::
GetInstance
().
GetPrinterName
(),
m_orderObject
);
}
}
}
fmTakeaway/detailForm.h
View file @
a0c954fa
...
@@ -43,7 +43,7 @@ signals:
...
@@ -43,7 +43,7 @@ signals:
* 返回:NULL
* 返回:NULL
* */
* */
void
processOrder
(
const
QString
&
operation
,
const
QString
&
orderId
,
const
DeliverObject
&
deliverObj
);
void
processOrder
(
const
QString
&
operation
,
const
QString
&
orderId
,
const
DeliverObject
&
deliverObj
);
void
processRejectOrder
(
const
QString
&
orderId
,
const
int
&
reason
);
void
processRejectOrder
(
const
QString
&
orderId
,
const
int
&
reason
,
const
int
&
reasontype
);
private
slots
:
private
slots
:
/* 功能:处理订单按钮点击
/* 功能:处理订单按钮点击
...
...
fmTakeaway/detailForm.ui
View file @
a0c954fa
...
@@ -215,6 +215,9 @@
...
@@ -215,6 +215,9 @@
<height>
16777215
</height>
<height>
16777215
</height>
</size>
</size>
</property>
</property>
<property
name=
"toolTipDuration"
>
<number>
-1
</number>
</property>
<property
name=
"frameShape"
>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
<enum>
QFrame::StyledPanel
</enum>
</property>
</property>
...
...
fmTakeaway/floatForm.cpp
View file @
a0c954fa
...
@@ -27,10 +27,8 @@ FloatForm::FloatForm(QWidget *parent) :
...
@@ -27,10 +27,8 @@ FloatForm::FloatForm(QWidget *parent) :
m_animation
.
setPropertyName
(
"windowOpacity"
);
m_animation
.
setPropertyName
(
"windowOpacity"
);
m_animation
.
setDuration
(
ConfigManger
::
GetInstance
().
GetBlinkInterval
());
m_animation
.
setDuration
(
ConfigManger
::
GetInstance
().
GetBlinkInterval
());
m_animation
.
setEasingCurve
(
QEasingCurve
::
InOutSine
);
m_animation
.
setEasingCurve
(
QEasingCurve
::
InOutSine
);
m_raiseTimer
.
setInterval
(
2000
);
m_raiseTimer
.
setInterval
(
2000
);
connect
(
&
m_raiseTimer
,
&
QTimer
::
timeout
,
this
,
&
FloatForm
::
raise
);
connect
(
&
m_raiseTimer
,
&
QTimer
::
timeout
,
this
,
&
FloatForm
::
raise
);
//connect(&m_mouseTimer, &QTimer::timeout, this, &FloatForm::restart);
_Init
();
_Init
();
}
}
...
@@ -58,14 +56,14 @@ void FloatForm::mousePressEvent(QMouseEvent *event)
...
@@ -58,14 +56,14 @@ void FloatForm::mousePressEvent(QMouseEvent *event)
m_bMousePress
=
true
;
m_bMousePress
=
true
;
m_lastMousePos
=
event
->
globalPos
();
m_lastMousePos
=
event
->
globalPos
();
m_absMove
=
QPoint
(
0
,
0
);
m_absMove
=
QPoint
(
0
,
0
);
//m_mouseTimer.start(5000);
}
}
if
(
event
->
button
()
==
Qt
::
RightButton
)
if
(
event
->
button
()
==
Qt
::
RightButton
)
{
{
sInfoThread
.
terminate
();
sInfoThread
.
terminate
();
workThread
.
terminate
();
workThread
.
terminate
();
qApp
->
exit
(
-
1
);
emit
closePort
();
QProcess
::
startDetached
(
qApp
->
applicationFilePath
(),
QStringList
(
qApp
->
applicationFilePath
()));
// qApp->exit();
// QProcess::startDetached(qApp->applicationFilePath(), QStringList(qApp->applicationFilePath()));
}
}
}
}
...
...
fmTakeaway/floatForm.h
View file @
a0c954fa
...
@@ -49,8 +49,6 @@ private:
...
@@ -49,8 +49,6 @@ private:
int
m_wavPlayInterval
;
int
m_wavPlayInterval
;
// 置顶定时器
// 置顶定时器
QTimer
m_raiseTimer
;
QTimer
m_raiseTimer
;
//长按定时器
QTimer
m_mouseTimer
;
/* 功能:初始化
/* 功能:初始化
* 参数:NULL
* 参数:NULL
...
@@ -76,11 +74,11 @@ signals:
...
@@ -76,11 +74,11 @@ signals:
* 返回:NULL
* 返回:NULL
* */
* */
void
showMainForm
();
void
showMainForm
();
/* 功能:通知
main重启
/* 功能:通知
关闭端口
* 参数:NULL
* 参数:NULL
* 返回:NULL
* 返回:NULL
* */
* */
void
resta
rt
();
void
closePo
rt
();
public
slots
:
public
slots
:
/* 功能:开启提示
/* 功能:开启提示
...
...
fmTakeaway/fmTakeaway.pro
View file @
a0c954fa
...
@@ -73,7 +73,9 @@ FORMS += mainForm.ui \
...
@@ -73,7 +73,9 @@ FORMS += mainForm.ui \
padForm
.
ui
\
padForm
.
ui
\
RejectForm
.
ui
RejectForm
.
ui
RC_FILE
+=
fmTakeaway
.
rc
#RC_FILE += fmTakeaway.rc
RC_FILE
+=
uac
.
rc
CONFIG
(
release
,
debug
|
release
)
{
CONFIG
(
release
,
debug
|
release
)
{
LIBS
+=
-
L
..
/
fmPlugin
/
release
-
lfmPlugin
LIBS
+=
-
L
..
/
fmPlugin
/
release
-
lfmPlugin
...
@@ -83,4 +85,3 @@ CONFIG(release, debug|release) {
...
@@ -83,4 +85,3 @@ CONFIG(release, debug|release) {
LIBS
+=
-
L
..
/
fmPrinter
/
debug
-
lfmPrinter
LIBS
+=
-
L
..
/
fmPrinter
/
debug
-
lfmPrinter
}
}
fmTakeaway/main.cpp
View file @
a0c954fa
...
@@ -52,13 +52,13 @@ void LoadTheme(const QString& theme)
...
@@ -52,13 +52,13 @@ void LoadTheme(const QString& theme)
int
main
(
int
argc
,
char
*
argv
[])
int
main
(
int
argc
,
char
*
argv
[])
{
{
//
HANDLE m_hMutex = CreateMutex(NULL, FALSE, L"fmTakeaway" );
HANDLE
m_hMutex
=
CreateMutex
(
NULL
,
FALSE
,
L"fmTakeaway"
);
//
if (GetLastError() == ERROR_ALREADY_EXISTS) {
if
(
GetLastError
()
==
ERROR_ALREADY_EXISTS
)
{
//
CloseHandle(m_hMutex);
CloseHandle
(
m_hMutex
);
//
m_hMutex = NULL;
m_hMutex
=
NULL
;
//
return -1;
return
-
1
;
//
}
}
QApplication
a
(
argc
,
argv
);
QApplication
a
(
argc
,
argv
);
g_appDir
=
a
.
applicationDirPath
();
g_appDir
=
a
.
applicationDirPath
();
...
@@ -81,7 +81,8 @@ int main(int argc, char *argv[])
...
@@ -81,7 +81,8 @@ int main(int argc, char *argv[])
QObject
::
connect
(
&
w
,
&
MainForm
::
startRemind
,
&
f
,
&
FloatForm
::
onStartRemind
);
QObject
::
connect
(
&
w
,
&
MainForm
::
startRemind
,
&
f
,
&
FloatForm
::
onStartRemind
);
QObject
::
connect
(
&
w
,
&
MainForm
::
stopRemind
,
&
f
,
&
FloatForm
::
onStopRemind
);
QObject
::
connect
(
&
w
,
&
MainForm
::
stopRemind
,
&
f
,
&
FloatForm
::
onStopRemind
);
QObject
::
connect
(
&
f
,
&
FloatForm
::
showMainForm
,
&
w
,
&
MainForm
::
show
);
QObject
::
connect
(
&
f
,
&
FloatForm
::
showMainForm
,
&
w
,
&
MainForm
::
show
);
QObject
::
connect
(
&
f
,
&
FloatForm
::
restart
,
&
w
,
&
MainForm
::
onrestart
);
QObject
::
connect
(
&
f
,
&
FloatForm
::
closePort
,
&
SInfoControl
::
GetInstance
(),
&
SInfoControl
::
doclosePort
);
//QObject::connect(&f, &FloatForm::restart, &w, &MainForm::onrestart);
w
.
MyShow
();
w
.
MyShow
();
// 将门店信息获取控制器移到工作线程
// 将门店信息获取控制器移到工作线程
...
...
fmTakeaway/mainForm.cpp
View file @
a0c954fa
...
@@ -219,9 +219,7 @@ void MainForm::onShowSearchOrderResult(const QMap<QString,QString>& orderIdList)
...
@@ -219,9 +219,7 @@ void MainForm::onShowSearchOrderResult(const QMap<QString,QString>& orderIdList)
void
MainForm
::
onrestart
()
void
MainForm
::
onrestart
()
{
{
}
}
void
MainForm
::
_RevertBtnTable
()
void
MainForm
::
_RevertBtnTable
()
{
{
m_prevBtn
->
setChecked
(
false
);
m_prevBtn
->
setChecked
(
false
);
...
...
run/skin/deaufult.qss
View file @
a0c954fa
...
@@ -466,17 +466,19 @@ QWidget
...
@@ -466,17 +466,19 @@ QWidget
height: 0px;
height: 0px;
}
}
/*---------------------------------DetailForm[ end ]---------------------------------*/
/*---------------------------------DetailForm[ end ]---------------------------------*/
/*---------------------------------Reject
Dialog
[start]-------------------------------------*/
/*---------------------------------Reject
Form
[start]-------------------------------------*/
#Reject
Dialog
#Reject
Form
{
{
background-color:rgb(245,245,245);
background-color:rgb(245,245,245);
}
}
#rejectLabHead
#rejectLabHead
{
{
font: 14pt "微软雅黑";
background-color:rgb(238, 122, 42);
background-color:rgb(238, 122, 42);
}
}
#rejectBtnOk,#rejectBtnCancle
#rejectBtnOk,#rejectBtnCancle
{
{
font: 14pt "微软雅黑";
color: rgb(255, 255, 255);
color: rgb(255, 255, 255);
background-color: rgb(238,122,42);
background-color: rgb(238,122,42);
border-radius: 3px;
border-radius: 3px;
...
@@ -487,7 +489,11 @@ QWidget
...
@@ -487,7 +489,11 @@ QWidget
background-color: rgb(222,184,135);
background-color: rgb(222,184,135);
border-radius: 3px;
border-radius: 3px;
}
}
/*---------------------------------RejectDialog[end]-------------------------------------*/
#rejectRbtn0,#rejectRbtn1,#rejectRbtn2,#rejectRbtn3,#rejectRbtn4,#rejectRbtn5
{
font: 14pt "微软雅黑";
}
/*---------------------------------RejectForm[end]-------------------------------------*/
...
...
run/skin/deaufult.rcc
View file @
a0c954fa
No preview for this file type
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