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
ceb97a3f
Commit
ceb97a3f
authored
Sep 18, 2016
by
ss.dai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时改动
parent
2a09b4c6
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
221 additions
and
21 deletions
+221
-21
fmTakeaway/Control/flowControl.cpp
+1
-2
fmTakeaway/Control/refundControl.cpp
+12
-0
fmTakeaway/Control/refundControl.h
+1
-0
fmTakeaway/DTools/configManger.cpp
+0
-1
fmTakeaway/Network/billSocket.cpp
+0
-1
fmTakeaway/detailForm.cpp
+6
-0
fmTakeaway/detailForm.h
+6
-0
fmTakeaway/detailForm.ui
+10
-10
fmTakeaway/fmTakeaway.pro
+6
-6
fmTakeaway/preDefine.h
+2
-1
fmTakeaway/refuseForm.cpp
+30
-0
fmTakeaway/refuseForm.h
+44
-0
fmTakeaway/refuseForm.ui
+103
-0
No files found.
fmTakeaway/Control/flowControl.cpp
View file @
ceb97a3f
...
...
@@ -51,8 +51,7 @@ bool FlowControl::_Login()
QJsonObject
sendJson
;
QJsonObject
recvJson
;
// TODO
sendJson
=
DataManger
::
GetInstance
().
GetLoginData
(
/*m_storeId*//*"posoperator"*/
"fm9999"
,
SERVER_PASSWORD
,
m_posId
,
m_cashierId
);
sendJson
=
DataManger
::
GetInstance
().
GetLoginData
(
m_storeId
,
SERVER_PASSWORD
,
m_posId
,
m_cashierId
);
emit
showAlert
(
AlertForm
::
LOADING
,
"正在登录......"
);
QLOG_INFO
()
<<
QString
(
"[---login---][requestData:%1]"
).
arg
(
_GetJsonStr
(
sendJson
));
...
...
fmTakeaway/Control/refundControl.cpp
View file @
ceb97a3f
...
...
@@ -15,12 +15,18 @@ void RefundControl::SetListenPort(int port)
m_port
=
port
;
}
RefundControl
::~
RefundControl
()
{
}
// 同步模式
void
RefundControl
::
run
()
{
m_procOrderSocket
=
new
BillSocket
(
this
);
m_tcpServer
=
new
QTcpServer
(
this
);
qDebug
()
<<
11
<<
m_tcpServer
->
serverError
();
if
(
!
m_tcpServer
->
listen
(
QHostAddress
::
LocalHost
,
m_port
))
{
QLOG_WARN
()
<<
QString
(
"tcp server listen failed on port[%1]"
).
arg
(
m_port
);
...
...
@@ -39,6 +45,12 @@ void RefundControl::run()
{
continue
;
}
if
(
QAbstractSocket
::
UnknownSocketError
!=
m_tcpServer
->
serverError
())
{
continue
;
}
QLOG_INFO
()
<<
"onNewConnecion....."
;
QString
error
;
QString
orderId
,
reason
;
int
version
,
reqtype
;
...
...
fmTakeaway/Control/refundControl.h
View file @
ceb97a3f
...
...
@@ -20,6 +20,7 @@ private:
RefundControl
(){}
RefundControl
(
RefundControl
const
&
);
RefundControl
&
operator
=
(
RefundControl
const
&
);
~
RefundControl
();
QTcpServer
*
m_tcpServer
;
QTcpSocket
*
m_tcpSocket
;
...
...
fmTakeaway/DTools/configManger.cpp
View file @
ceb97a3f
...
...
@@ -22,7 +22,6 @@ ConfigManger::SqlConnectInfo ConfigManger::GetSqlConnectInfo()
{
SqlConnectInfo
info
;
info
.
host
=
m_userConfig
->
value
(
INI_HOST
).
toString
();
qDebug
()
<<
info
.
host
;
info
.
username
=
m_userConfig
->
value
(
INI_USERNAME
).
toString
();
info
.
password
=
m_userConfig
->
value
(
INI_PASSWORD
).
toString
();
info
.
database
=
m_userConfig
->
value
(
INI_DATABASE
).
toString
();
...
...
fmTakeaway/Network/billSocket.cpp
View file @
ceb97a3f
...
...
@@ -48,7 +48,6 @@ bool BillSocket::Request(const QJsonObject &requestJson, QJsonObject &recvJson,
return
false
;
}
recvJson
=
QJsonDocument
::
fromJson
(
recvArray
).
object
();
qDebug
()
<<
recvJson
;
reply
->
deleteLater
();
return
true
;
...
...
fmTakeaway/detailForm.cpp
View file @
ceb97a3f
...
...
@@ -27,6 +27,7 @@ DetailForm::~DetailForm()
void
DetailForm
::
InitData
(
OrderObject
*
orderObject
)
{
m_orderObject
=
orderObject
;
// 恢复界面
ui
->
detailTable0
->
clearContents
();
ui
->
detailTable0
->
setRowCount
(
0
);
...
...
@@ -124,3 +125,8 @@ void DetailForm::on_detailBtn1_clicked()
{
FmPrinter
::
GetInstance
().
DoPrint
(
ConfigManger
::
GetInstance
().
GetPrinterName
(),
m_orderObject
);
}
void
DetailForm
::
on_detailBtn2_clicked
()
{
}
fmTakeaway/detailForm.h
View file @
ceb97a3f
...
...
@@ -5,6 +5,7 @@
#include <QTableWidget>
#include "Model/orderObject.h"
#include "Model/deliverObject.h"
#include "refuseForm.h"
namespace
Ui
{
class
DetailForm
;
...
...
@@ -63,6 +64,11 @@ private slots:
* 返回:NULL
* */
void
on_detailBtn1_clicked
();
/* 功能:处理拒绝按钮点击
* 参数:NULL
* 返回:NULL
* */
void
on_detailBtn2_clicked
();
};
#endif // DETAILFORM_H
fmTakeaway/detailForm.ui
View file @
ceb97a3f
...
...
@@ -1060,34 +1060,34 @@
</hints>
</connection>
<connection>
<sender>
detailBtn
2
</sender>
<sender>
detailBtn
3
</sender>
<signal>
clicked()
</signal>
<receiver>
DetailForm
</receiver>
<slot>
onOperaBtnClicked()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
595
</x>
<y>
55
2
</y>
<x>
683
</x>
<y>
55
1
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
596
</x>
<y>
601
</y>
<x>
683
</x>
<y>
588
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
detailBtn
3
</sender>
<sender>
detailBtn
2
</sender>
<signal>
clicked()
</signal>
<receiver>
DetailForm
</receiver>
<slot>
onOperaBtnClicked()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
683
</x>
<y>
55
1
</y>
<x>
585
</x>
<y>
55
6
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
683
</x>
<y>
588
</y>
<x>
585
</x>
<y>
604
</y>
</hint>
</hints>
</connection>
...
...
fmTakeaway/fmTakeaway.pro
View file @
ceb97a3f
...
...
@@ -16,9 +16,6 @@ TEMPLATE = app
INCLUDEPATH
+=
..
/
fmPlugin
INCLUDEPATH
+=
..
/
fmPrinter
#TODO
DEFINES
+=
WITHOUT_DATABASE
SOURCES
+=
main
.
cpp
\
mainForm
.
cpp
\
alertForm
.
cpp
\
...
...
@@ -41,7 +38,8 @@ SOURCES += main.cpp\
Model
/
stockObject
.
cpp
\
DTools
/
clickedLineEdit
.
cpp
\
DTools
/
sysTray
.
cpp
\
padForm
.
cpp
padForm
.
cpp
\
refuseForm
.
cpp
HEADERS
+=
\
mainForm
.
h
\
...
...
@@ -66,7 +64,8 @@ HEADERS += \
Model
/
stockObject
.
h
\
DTools
/
clickedLineEdit
.
h
\
DTools
/
sysTray
.
h
\
padForm
.
h
padForm
.
h
\
refuseForm
.
h
FORMS
+=
mainForm
.
ui
\
alertForm
.
ui
\
...
...
@@ -75,7 +74,8 @@ FORMS += mainForm.ui \
settingForm
.
ui
\
floatForm
.
ui
\
detailForm
.
ui
\
padForm
.
ui
padForm
.
ui
\
refuseForm
.
ui
RC_FILE
+=
fmTakeaway
.
rc
...
...
fmTakeaway/preDefine.h
View file @
ceb97a3f
...
...
@@ -75,6 +75,7 @@
#define OPERATIONNAME_SENDOUT "送出"
#define OPERATIONNAME_COMPLETE "完成"
#define OPERATIONNAME_REFUSEREFUND "拒绝"
#define OPERATIONNAME_REFUND "同意"
// 属性名称
#define PROPERTY_ID "id" // 人员编号
...
...
@@ -92,7 +93,7 @@
// 默认重新尝试登录的时间
#define VALUE_RELOGINTIME 20000
// 新订单提示音音频时长
#define VALUE_NEWORDERTIME
3
000 //TODO
#define VALUE_NEWORDERTIME
6
000 //TODO
// 需退款提示音音频时长
#define VALUE_REFUNDORDERTIME 5000 //TODO
// 同步库存默认时长
...
...
fmTakeaway/refuseForm.cpp
0 → 100644
View file @
ceb97a3f
#include "refuseForm.h"
#include "ui_refuseForm.h"
RefuseForm
::
RefuseForm
(
QWidget
*
parent
)
:
QDialog
(
parent
),
ui
(
new
Ui
::
RefuseForm
)
{
ui
->
setupUi
(
this
);
setWindowFlags
(
this
->
windowFlags
()
|
Qt
::
FramelessWindowHint
);
}
RefuseForm
::~
RefuseForm
()
{
delete
ui
;
}
void
RefuseForm
::
SetFormInfo
(
QStringList
reasons
,
QString
orderId
,
QString
operation
)
{
}
void
RefuseForm
::
on_refuseBtnCancle_clicked
()
{
this
->
accept
();
}
void
RefuseForm
::
on_refuseBtnOk_clicked
()
{
}
fmTakeaway/refuseForm.h
0 → 100644
View file @
ceb97a3f
#ifndef REFUSEFORM_H
#define REFUSEFORM_H
#include <QDialog>
#include <QMap>
namespace
Ui
{
class
RefuseForm
;
}
class
RefuseForm
:
public
QDialog
{
Q_OBJECT
public
:
explicit
RefuseForm
(
QWidget
*
parent
=
0
);
~
RefuseForm
();
/* 功能:设置窗口信息
* 参数:[1]原因列表 [2]订单ID [3]操作名称
* 返回:NULL
* */
void
SetFormInfo
(
QStringList
reasons
,
QString
orderId
,
QString
operation
);
private
slots
:
/* 功能:取消按钮对应的操作
* 参数:NULL
* 返回:NULL
* */
void
on_refuseBtnCancle_clicked
();
/* 功能:确定按钮对应的操作
* 参数:[bEnable]是否启用
* 返回:NULL
* */
void
on_refuseBtnOk_clicked
();
private
:
Ui
::
RefuseForm
*
ui
;
QString
m_orderId
;
QString
m_operation
;
QMap
<
QString
,
QString
>
m_reasonCode
;
};
#endif // REFUSEFORM_H
fmTakeaway/refuseForm.ui
0 → 100644
View file @
ceb97a3f
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
RefuseForm
</class>
<widget
class=
"QDialog"
name=
"RefuseForm"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
230
</width>
<height>
300
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Dialog
</string>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
stretch=
"0,3,1"
>
<property
name=
"spacing"
>
<number>
8
</number>
</property>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<widget
class=
"QLabel"
name=
"refuseLab0"
>
<property
name=
"minimumSize"
>
<size>
<width>
0
</width>
<height>
34
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
16777215
</width>
<height>
34
</height>
</size>
</property>
<property
name=
"text"
>
<string>
选择拒绝原因
</string>
</property>
<property
name=
"alignment"
>
<set>
Qt::AlignCenter
</set>
</property>
</widget>
</item>
<item>
<layout
class=
"QVBoxLayout"
name=
"vlBody"
/>
</item>
<item>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout"
>
<item>
<widget
class=
"QPushButton"
name=
"refuseBtnOk"
>
<property
name=
"minimumSize"
>
<size>
<width>
70
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
70
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"text"
>
<string>
确 定
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QPushButton"
name=
"refuseBtnCancle"
>
<property
name=
"minimumSize"
>
<size>
<width>
70
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"maximumSize"
>
<size>
<width>
70
</width>
<height>
30
</height>
</size>
</property>
<property
name=
"text"
>
<string>
取 消
</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
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