Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmtakeout
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
李定达
fmtakeout
Commits
c9662818
Commit
c9662818
authored
Oct 08, 2018
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.支持bpla标签打印指令集;2.门店号读取位置分离便于升级;3.调整版本
parent
c8879c49
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
81 additions
and
22 deletions
+81
-22
takeout/base/Print/printlib.cpp
+42
-4
takeout/control/ordergetwork.cpp
+1
-1
takeout/main.cpp
+32
-12
takeout/preDefine.h
+1
-0
takeout/takeout.rc
+4
-4
takeout/view/loginform.cpp
+1
-1
No files found.
takeout/base/Print/printlib.cpp
View file @
c9662818
...
...
@@ -50,13 +50,14 @@ void PrintLib::_PrintLab( OrderObject* order)
deliveryTime
=
QDateTime
::
fromTime_t
(
order
->
delivery_time
).
toString
(
"hh:mm"
);
datetime
=
QDateTime
::
currentDateTime
().
toString
(
"MM/dd"
);
}
int
index
;
int
index
=
0
;
foreach
(
ProductObject
*
dish
,
order
->
proList
)
{
f_TSCInit
();
QString
title
=
QString
(
"%1 %2 %3 %4/%5"
).
arg
(
QString
::
number
(
order
->
order_index
),
datetime
,
deliveryTime
,
QString
::
number
(
++
index
),
QString
::
number
(
order
->
proList
.
size
()));
//qDebug() << "f_TSCInit";
QString
title
=
QString
(
"%1 %2 %3 %4/%5"
).
arg
(
QString
::
number
(
order
->
order_index
),
datetime
,
deliveryTime
,
QString
::
number
(
++
index
),
QString
::
number
(
order
->
proList
.
size
()));
f_TSCWinPrintln
(
10
,
0
,
25
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
title
.
toLocal8Bit
().
data
(),
0
);
f_TSCWinPrintln
(
0
,
0
,
22
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
"--------------------------------
"
,
0
);
f_TSCWinPrintln
(
0
,
0
,
22
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
"--------------------------------
---"
,
0.0266666
);
f_TSCWinPrintln
(
10
,
0
,
30
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
dish
->
name
.
append
(
" ¥"
).
append
(
QString
::
number
(
dish
->
price
/
100.0
,
'f'
,
2
)).
toLocal8Bit
().
data
(),
0.0666665
);
...
...
@@ -77,9 +78,12 @@ void PrintLib::_PrintLab( OrderObject* order)
property_tags
.
remove
(
property_tags
.
length
()
-
1
,
1
);
f_TSCWinPrintln
(
10
,
0
,
24
,
0
,
2
,
2
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
property_tags
.
toLocal8Bit
().
data
(),
0.0666665
);
f_TSCWinPrintln
(
10
,
180
,
26
,
0
,
2
,
0
,
0
,
QString
(
"
\xE5\xAE\x8B\xE4\xBD\x93
"
).
toLocal8Bit
().
data
(),
order
->
store_name
.
toLocal8Bit
().
data
(),
0.0666665
);
f_TSCWinPrintPage
(
"1"
,
"1"
);
//qDebug() << "up f_TSCWinPrintPage";
f_TSCWinPrintPage
(
"1"
,
"1"
);
//qDebug() << "down f_TSCWinPrintPage";
}
}
...
...
@@ -380,5 +384,39 @@ QString PrintLib::_GetPrintIni()
ini
.
append
(
config
.
value
(
"Printer/crow"
,
"1"
).
toString
());
ini
.
append
(
"|"
);
//ini.append( config.value("Printer/crow").toString());
// ini.append("1");
// ini.append("|");
//ini.append( config.value("Printer/label_type").toString());
// ini.append("1");
// ini.append("|");
//ini.append( config.value("Printer/clabel_parallrow").toString());
// ini.append("1");
// ini.append("|");
//ini.append( config.value("Printer/label_usb").toString());
// ini.append("1");
// ini.append("|");
//ini.append( config.value("Printer/label_ip").toString());
// ini.append("1");
// ini.append("|");
//ini.append( config.value("Printer/label_ip").toString());
// ini.append("4");
// ini.append("|");
// strcpy(data, ini.c_str());
//指令集选项
//标签打印机指令集0是TSC 适用佳博等;1PBAL 使用新北洋等;
ini
.
append
(
config
.
value
(
"Printer/labeltype"
,
"0"
).
toString
());
ini
.
append
(
"|"
);
ini
.
append
(
config
.
value
(
"Printer/labelparall"
,
"LPT1"
).
toString
());
ini
.
append
(
"|"
);
ini
.
append
(
config
.
value
(
"Printer/labelusb"
,
"USB-0"
).
toString
());
ini
.
append
(
"|"
);
ini
.
append
(
config
.
value
(
"Printer/labelip"
,
"127.0.0.1"
).
toString
());
ini
.
append
(
"|"
);
//标签打印机端口打开方式 3:Ip 4:驱动;
ini
.
append
(
config
.
value
(
"Printer/labelprttype"
,
"4"
).
toString
());
ini
.
append
(
"|"
);
return
ini
;
}
takeout/control/ordergetwork.cpp
View file @
c9662818
...
...
@@ -380,7 +380,7 @@ bool OrderGetWork::bingToServer(QString &error)
#else
void
OrderGetWork
::
SetStoreInfoToConfig
()
{
QString
configfile
=
qApp
->
applicationDirPath
()
+
"/"
+
CONFIG
_NAME
;
QString
configfile
=
qApp
->
applicationDirPath
()
+
"/"
+
STOREINFO
_NAME
;
QSettings
(
configfile
,
QSettings
::
IniFormat
).
setValue
(
INI_BASE_PARNETID
,
_storeinfo
[
JSON_KEY_PARTNERID
]);
QSettings
(
configfile
,
QSettings
::
IniFormat
).
setValue
(
INI_BASE_STOREID
,
_storeinfo
[
JSON_STOREID
]);
...
...
takeout/main.cpp
View file @
c9662818
...
...
@@ -183,27 +183,47 @@ int main(int argc, char *argv[])
QObject
::
connect
(
&
mainform
,
&
MainForm
::
showFloatForm
,
&
floatform
,
&
FloatForm
::
onShow
);
QObject
::
connect
(
&
mainform
,
&
MainForm
::
startRemind
,
&
floatform
,
&
FloatForm
::
onStartRemind
);
QObject
::
connect
(
&
mainform
,
&
MainForm
::
stopRemind
,
&
floatform
,
&
FloatForm
::
onStopRemind
);
//QObject::connect(&floatform, &FloatForm::showMainForm, &mainform, &MainForm::show);
QObject
::
connect
(
&
loginform
,
&
LoginForm
::
showmainform
,
&
mainform
,
&
MainForm
::
showFullScreen
);
//QObject::connect(&loginform, &LoginForm::showmainform, &mainform, &MainForm::show);
QObject
::
connect
(
&
loginform
,
&
LoginForm
::
showfloat
,
&
floatform
,
&
FloatForm
::
onShow
);
QObject
::
connect
(
&
floatform
,
&
FloatForm
::
showMainForm
,
&
loginform
,
&
LoginForm
::
showfull
);
QString
configfile
=
qApp
->
applicationDirPath
()
+
"/"
+
CONFIG_NAME
;
QString
storefile
=
qApp
->
applicationDirPath
()
+
"/"
+
STOREINFO_NAME
;
QLOG_INFO
()
<<
"config file name : "
<<
configfile
;
QLOG_INFO
()
<<
"store file name : "
<<
storefile
;
QString
tmpstoreid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_STOREID
).
toString
();
QString
tmppartnerid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_PARNETID
).
toString
();
QString
tmpuserid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_USERID
).
toString
();
QString
tmppwd
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_PWD
).
toString
();
QString
tmpstationid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_STATIONIID
).
toString
();
QString
storeid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_STOREID
).
toString
();
QString
partnerid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_PARNETID
).
toString
();
QString
userid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_USERID
).
toString
();
QString
pwd
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_PWD
).
toString
();
QString
stationid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_STATIONIID
).
toString
();
QString
autoconf
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_AUTOCONFIRM
).
toString
();
QFile
file
(
storefile
);
if
(
!
file
.
exists
())
{
QLOG_INFO
()
<<
"Not found "
<<
storefile
;
file
.
open
(
QFile
::
ReadWrite
);
file
.
close
();
if
(
!
tmpstoreid
.
isEmpty
()
&&
!
tmppartnerid
.
isEmpty
()
&&
!
tmpuserid
.
isEmpty
()
&&
!
tmppwd
.
isEmpty
()
&&
!
tmpstationid
.
isEmpty
())
{
QSettings
(
storefile
,
QSettings
::
IniFormat
).
setValue
(
INI_BASE_PARNETID
,
tmppartnerid
);
QSettings
(
storefile
,
QSettings
::
IniFormat
).
setValue
(
INI_BASE_STOREID
,
tmpstoreid
);
QSettings
(
storefile
,
QSettings
::
IniFormat
).
setValue
(
INI_BASE_STATIONIID
,
tmpstationid
);
QSettings
(
storefile
,
QSettings
::
IniFormat
).
setValue
(
INI_BASE_USERID
,
tmpuserid
);
QSettings
(
storefile
,
QSettings
::
IniFormat
).
setValue
(
INI_BASE_PWD
,
tmppwd
);
}
}
QString
storeid
=
QSettings
(
storefile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_STOREID
).
toString
();
QString
partnerid
=
QSettings
(
storefile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_PARNETID
).
toString
();
QString
userid
=
QSettings
(
storefile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_USERID
).
toString
();
QString
pwd
=
QSettings
(
storefile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_PWD
).
toString
();
QString
stationid
=
QSettings
(
storefile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_STATIONIID
).
toString
();
QString
autoconf
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_AUTOCONFIRM
).
toString
();
QString
pushurl
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_PUSHSERVER
).
toString
();
QString
geturl
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_GETSERVER
).
toString
();
...
...
takeout/preDefine.h
View file @
c9662818
...
...
@@ -33,6 +33,7 @@
#define SERVER_PASSWORD "posoperator@freemud.cn"
#define CONFIG_NAME "config.ini"
#define STOREINFO_NAME "store.ini"
#define USERCONFIG_NAME "userConfig.ini"
#define UI_CASHIER "<font color='#ff0000'>未选择</font>"
...
...
takeout/takeout.rc
View file @
c9662818
...
...
@@ -4,8 +4,8 @@
#include <winver.h>
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,0,
1
PRODUCTVERSION 2,0,0,
1
FILEVERSION 2,0,0,
2
PRODUCTVERSION 2,0,0,
2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
...
...
@@ -22,12 +22,12 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
VALUE "CompanyName", "ShangHai Freemud Co., Ltd."
VALUE "FileDescription", "FREEMUD Manager System"
VALUE "FileVersion", "2.0.0.
1
"
VALUE "FileVersion", "2.0.0.
2
"
VALUE "InternalName", "FREEMUD"
VALUE "LegalCopyright", "Copyright (C)2017-2020"
VALUE "OriginalFilename", "fmTakeout.exe"
VALUE "ProductName", "fmTakeout"
VALUE "ProductVersion", "2.0.0.
1
"
VALUE "ProductVersion", "2.0.0.
2
"
END
END
BLOCK "VarFileInfo"
...
...
takeout/view/loginform.cpp
View file @
c9662818
...
...
@@ -79,7 +79,7 @@ LoginForm::~LoginForm()
void
LoginForm
::
SetStoreInfo
()
{
QString
configfile
=
qApp
->
applicationDirPath
()
+
"/"
+
CONFIG
_NAME
;
QString
configfile
=
qApp
->
applicationDirPath
()
+
"/"
+
STOREINFO
_NAME
;
QString
storeid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_STOREID
).
toString
();
QString
partnerid
=
QSettings
(
configfile
,
QSettings
::
IniFormat
).
value
(
INI_BASE_PARNETID
).
toString
();
...
...
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